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 boolean
add(Object obj)
boolean
addAll(Collection coll)
void
clear()
boolean
contains(Object obj)
boolean
containsAll(Collection coll)
boolean
equals(Object obj)
int
hashCode()
boolean
isEmpty()
Iterator
iterator()
boolean
remove(Object obj)
boolean
removeAll(Collection coll)
boolean
retainAll(Collection coll)
int
size()
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:
add
in interfaceCollection
- Specified by:
add
in interfaceSet
-
addAll
public boolean addAll(Collection coll)
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceSet
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceSet
-
contains
public boolean contains(Object obj)
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceSet
-
containsAll
public boolean containsAll(Collection coll)
- Specified by:
containsAll
in interfaceCollection
- Specified by:
containsAll
in interfaceSet
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceSet
-
iterator
public Iterator iterator()
-
remove
public boolean remove(Object obj)
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceSet
-
removeAll
public boolean removeAll(Collection coll)
- Specified by:
removeAll
in interfaceCollection
- Specified by:
removeAll
in interfaceSet
-
retainAll
public boolean retainAll(Collection coll)
- Specified by:
retainAll
in interfaceCollection
- Specified by:
retainAll
in interfaceSet
-
size
public int size()
- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceSet
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceSet
-
toArray
public Object[] toArray(Object[] arr)
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceSet
-
hashCode
public int hashCode()
-
-