T - the type of elements maintained by this Collectionpublic class ObjectOpenHashSet<T> extends AbstractObjectSet<T> implements ITrimmable
| Constructor and Description |
|---|
ObjectOpenHashSet()
Default Constructor
|
ObjectOpenHashSet(java.util.Collection<? extends T> collection)
Deprecated.
|
ObjectOpenHashSet(java.util.Collection<? extends T> collection,
float loadFactor)
Deprecated.
|
ObjectOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ObjectOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ObjectOpenHashSet(java.util.Iterator<T> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectOpenHashSet(java.util.Iterator<T> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectOpenHashSet(ObjectCollection<T> collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectOpenHashSet(ObjectCollection<T> collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectOpenHashSet(T[] array)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenHashSet(T[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenHashSet(T[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenHashSet(T[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T o) |
boolean |
addAll(java.util.Collection<? extends T> c)
Deprecated.
|
boolean |
addAll(ObjectCollection<T> c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(java.lang.Object o) |
ObjectIterator<T> |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(java.lang.Object o) |
int |
size() |
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
equals, hashCodecontainsAll, containsAny, containsAny, removeAll, retainAllcontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimspliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, removeAll, retainAllpublic ObjectOpenHashSet()
public ObjectOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ObjectOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenHashSet(T[] array)
array - the elements that should be put into the setpublic ObjectOpenHashSet(T[] array, float loadFactor)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenHashSet(T[] array, int offset, int length)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectOpenHashSet(T[] array, int offset, int length, float loadFactor)
array - the elements that should be put into the setoffset - the starting index within the array that should be usedlength - the amount of elements used from the arrayloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1java.lang.IllegalStateException - if offset and length causes to step outside of the arrays range@Deprecated public ObjectOpenHashSet(java.util.Collection<? extends T> collection)
collection - the set the elements should be added to the Set@Deprecated public ObjectOpenHashSet(java.util.Collection<? extends T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenHashSet(ObjectCollection<T> collection)
collection - the set the elements should be added to the Setpublic ObjectOpenHashSet(ObjectCollection<T> collection, float loadFactor)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenHashSet(java.util.Iterator<T> iterator)
iterator - the elements that should be added to the setpublic ObjectOpenHashSet(java.util.Iterator<T> iterator, float loadFactor)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public boolean add(T o)
@Deprecated public boolean addAll(java.util.Collection<? extends T> c)
AbstractObjectCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<T>addAll in interface java.util.Set<T>addAll in class AbstractObjectCollection<T>public boolean addAll(ObjectCollection<T> c)
ObjectCollectionaddAll in interface ObjectCollection<T>addAll in class AbstractObjectCollection<T>c - the collection of elements that should be addedpublic boolean contains(java.lang.Object o)
public boolean remove(java.lang.Object o)
public boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic ObjectIterator<T> iterator()
ObjectCollectioniterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.Set<T>iterator in interface ObjectCollection<T>iterator in interface ObjectIterable<T>iterator in interface ObjectSet<T>iterator in class AbstractObjectSet<T>Collection.iterator()public void clear()