Package org.proxy4j.core.struct
Class WeakHashSet<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<T>
-
- org.proxy4j.core.struct.WeakHashSet<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>
public class WeakHashSet<T> extends AbstractSet<T>
- Author:
- Brennan Spies
A
Setimplementation with weak references to contained elements.
-
-
Constructor Summary
Constructors Constructor Description WeakHashSet()WeakHashSet(int capacity, float loadFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T o)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)intsize()-
Methods inherited from class java.util.AbstractSet
equals, hashCode
-
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
containsAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public boolean add(T o)
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceSet<T>- Overrides:
addin classAbstractCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceSet<T>- Overrides:
addAllin classAbstractCollection<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceSet<T>- Overrides:
clearin classAbstractCollection<T>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceSet<T>- Overrides:
containsin classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceSet<T>- Overrides:
isEmptyin classAbstractCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceSet<T>- Overrides:
removein classAbstractCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T>- Specified by:
removeAllin interfaceSet<T>- Overrides:
removeAllin classAbstractSet<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceSet<T>- Specified by:
sizein classAbstractCollection<T>
-
-