Class WeakHashSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet
com.sun.jdo.spi.persistence.utility.WeakHashSet
- All Implemented Interfaces:
Serializable,Cloneable,Iterable,Collection,Set
A weak HashSet. An element stored in the WeakHashSet might be garbage collected,
if there is no strong reference to this element.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the specified element to this set if it is not already present.booleanReturnstrueif this set contains the specified element.iterator()Returns an iterator over the elements in this set.booleanRemoves the given element from this set if it is present.Methods inherited from class java.util.HashSet
clear, clone, isEmpty, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
WeakHashSet
public WeakHashSet()
-
-
Method Details
-
iterator
Returns an iterator over the elements in this set. The elements are returned in no particular order. -
contains
Returnstrueif this set contains the specified element. -
add
Adds the specified element to this set if it is not already present. -
remove
Removes the given element from this set if it is present.
-