Package com.adobe.internal.util
Class WeakHashSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet
-
- com.adobe.internal.util.WeakHashSet
-
- All Implemented Interfaces:
Iterable,Collection,Set
public class WeakHashSet extends AbstractSet implements Set
TheWeakHashSetis an implementation of theSetinterface that uses aWeakHashMap.
-
-
Constructor Summary
Constructors Constructor Description WeakHashSet()WeakHashSet(int initialCapacity)WeakHashSet(int initialCapacity, float loadFactor)WeakHashSet(Collection c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Object obj)voidclear()booleancontains(Object obj)booleanisEmpty()Iteratoriterator()booleanremove(Object obj)intsize()-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
WeakHashSet
public WeakHashSet()
-
WeakHashSet
public WeakHashSet(Collection c)
-
WeakHashSet
public WeakHashSet(int initialCapacity, float loadFactor)
-
WeakHashSet
public WeakHashSet(int initialCapacity)
-
-
Method Detail
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable- Specified by:
iteratorin interfaceSet- Specified by:
iteratorin classAbstractCollection
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet- Specified by:
sizein classAbstractCollection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet- Overrides:
isEmptyin classAbstractCollection
-
contains
public boolean contains(Object obj)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet- Overrides:
containsin classAbstractCollection
-
add
public boolean add(Object obj)
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet- Overrides:
addin classAbstractCollection
-
remove
public boolean remove(Object obj)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet- Overrides:
removein classAbstractCollection
-
clear
public void clear()
- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet- Overrides:
clearin classAbstractCollection
-
-