T - the type of elements maintained by this Collectionpublic class ObjectOpenCustomHashSet<T> extends AbstractObjectSet<T> implements ITrimmable
| Constructor and Description |
|---|
ObjectOpenCustomHashSet(java.util.Collection<? extends T> collection,
float loadFactor,
ObjectStrategy<? super T> strategy)
Deprecated.
|
ObjectOpenCustomHashSet(java.util.Collection<? extends T> collection,
ObjectStrategy<? super T> strategy)
Deprecated.
|
ObjectOpenCustomHashSet(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity and load factor
|
ObjectOpenCustomHashSet(int minCapacity,
ObjectStrategy<? super T> strategy)
Constructor that defines the minimum capacity
|
ObjectOpenCustomHashSet(java.util.Iterator<T> iterator,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectOpenCustomHashSet(java.util.Iterator<T> iterator,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ObjectOpenCustomHashSet(ObjectCollection<T> collection,
float loadFactor,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectOpenCustomHashSet(ObjectCollection<T> collection,
ObjectStrategy<? super T> strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ObjectOpenCustomHashSet(ObjectStrategy<? super T> strategy)
Default Contstructor
|
ObjectOpenCustomHashSet(T[] array,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenCustomHashSet(T[] array,
int offset,
int length,
float loadFactor,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenCustomHashSet(T[] array,
int offset,
int length,
ObjectStrategy<? super T> strategy)
Helper constructor that allow to create a set from unboxed values
|
ObjectOpenCustomHashSet(T[] array,
ObjectStrategy<? super T> strategy)
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) |
ObjectStrategy<? super T> |
getStrategy()
Helper getter function to get the current strategy
|
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 ObjectOpenCustomHashSet(ObjectStrategy<? super T> strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectOpenCustomHashSet(int minCapacity,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic ObjectOpenCustomHashSet(int minCapacity,
float loadFactor,
ObjectStrategy<? super T> strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenCustomHashSet(T[] array, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectOpenCustomHashSet(T[] array, float loadFactor, ObjectStrategy<? super T> strategy)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenCustomHashSet(T[] array, int offset, int length, ObjectStrategy<? super T> strategy)
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 arraystrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ObjectOpenCustomHashSet(T[] array, int offset, int length, float loadFactor, ObjectStrategy<? super T> strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 ObjectOpenCustomHashSet(java.util.Collection<? extends T> collection, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is null@Deprecated public ObjectOpenCustomHashSet(java.util.Collection<? extends T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenCustomHashSet(ObjectCollection<T> collection, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectOpenCustomHashSet(ObjectCollection<T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectOpenCustomHashSet(java.util.Iterator<T> iterator, ObjectStrategy<? super T> strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ObjectOpenCustomHashSet(java.util.Iterator<T> iterator, float loadFactor, ObjectStrategy<? super T> strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public ObjectStrategy<? super T> getStrategy()
public 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()