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
TheWeakHashSet
is an implementation of theSet
interface 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 boolean
add(Object obj)
void
clear()
boolean
contains(Object obj)
boolean
isEmpty()
Iterator
iterator()
boolean
remove(Object obj)
int
size()
-
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:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceSet
- Specified by:
iterator
in classAbstractCollection
-
size
public int size()
- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceSet
- Specified by:
size
in classAbstractCollection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection
- Specified by:
isEmpty
in interfaceSet
- Overrides:
isEmpty
in classAbstractCollection
-
contains
public boolean contains(Object obj)
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceSet
- Overrides:
contains
in classAbstractCollection
-
add
public boolean add(Object obj)
- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceSet
- Overrides:
add
in classAbstractCollection
-
remove
public boolean remove(Object obj)
- Specified by:
remove
in interfaceCollection
- Specified by:
remove
in interfaceSet
- Overrides:
remove
in classAbstractCollection
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection
- Specified by:
clear
in interfaceSet
- Overrides:
clear
in classAbstractCollection
-
-