Package org.apache.openjpa.lib.util
Class ReferenceHashSet
- java.lang.Object
-
- org.apache.openjpa.lib.util.ReferenceHashSet
-
- All Implemented Interfaces:
Serializable,Iterable,Collection,Set
public class ReferenceHashSet extends Object implements Set, Serializable
A set whose values may be stored as weak or soft references.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReferenceHashSet(AbstractReferenceMap.ReferenceStrength refType)Construct a set with the given reference type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Object obj)booleanaddAll(Collection coll)voidclear()booleancontains(Object obj)booleancontainsAll(Collection coll)booleanequals(Object obj)inthashCode()booleanisEmpty()Iteratoriterator()booleanremove(Object obj)booleanremoveAll(Collection coll)booleanretainAll(Collection coll)intsize()Object[]toArray()Object[]toArray(Object[] arr)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
ReferenceHashSet
public ReferenceHashSet(AbstractReferenceMap.ReferenceStrength refType)
Construct a set with the given reference type.
-
-
Method Detail
-
add
public boolean add(Object obj)
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet
-
addAll
public boolean addAll(Collection coll)
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceSet
-
clear
public void clear()
- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet
-
contains
public boolean contains(Object obj)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet
-
containsAll
public boolean containsAll(Collection coll)
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceSet
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet
-
iterator
public Iterator iterator()
-
remove
public boolean remove(Object obj)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet
-
removeAll
public boolean removeAll(Collection coll)
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceSet
-
retainAll
public boolean retainAll(Collection coll)
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceSet
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
toArray
public Object[] toArray(Object[] arr)
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
hashCode
public int hashCode()
-
-