public class ShortOpenCustomHashSet extends AbstractShortSet implements ITrimmable
| Constructor and Description |
|---|
ShortOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
float loadFactor,
ShortStrategy strategy)
Deprecated.
|
ShortOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
ShortStrategy strategy)
Deprecated.
|
ShortOpenCustomHashSet(int minCapacity,
float loadFactor,
ShortStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
ShortOpenCustomHashSet(int minCapacity,
ShortStrategy strategy)
Constructor that defines the minimum capacity
|
ShortOpenCustomHashSet(java.util.Iterator<java.lang.Short> iterator,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortOpenCustomHashSet(java.util.Iterator<java.lang.Short> iterator,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortOpenCustomHashSet(short[] array,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortOpenCustomHashSet(short[] array,
int offset,
int length,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortOpenCustomHashSet(short[] array,
int offset,
int length,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortOpenCustomHashSet(short[] array,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortOpenCustomHashSet(ShortCollection collection,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortOpenCustomHashSet(ShortCollection collection,
ShortStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortOpenCustomHashSet(ShortIterator iterator,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortOpenCustomHashSet(ShortIterator iterator,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortOpenCustomHashSet(ShortStrategy strategy)
Default Contstructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(short o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Short> c)
Deprecated.
|
boolean |
addAll(ShortCollection 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(short o)
A Type-Specific implementation of contains.
|
ShortStrategy |
getStrategy()
Helper getter function to get the current strategy
|
ShortIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(short o)
A Type Specific remove function to reduce boxing/unboxing
|
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, hashCodeadd, contains, containsAll, containsAny, containsAny, remove, removeAll, remShort, retainAll, toShortArray, toShortArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remove, remShort, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toShortArray, toShortArrayforEach, forEachpublic ShortOpenCustomHashSet(ShortStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ShortOpenCustomHashSet(int minCapacity,
ShortStrategy 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 ShortOpenCustomHashSet(int minCapacity,
float loadFactor,
ShortStrategy 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 ShortOpenCustomHashSet(short[] array,
ShortStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ShortOpenCustomHashSet(short[] array,
float loadFactor,
ShortStrategy 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 ShortOpenCustomHashSet(short[] array,
int offset,
int length,
ShortStrategy 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 ShortOpenCustomHashSet(short[] array,
int offset,
int length,
float loadFactor,
ShortStrategy 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 ShortOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
ShortStrategy 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 ShortOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
float loadFactor,
ShortStrategy 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 ShortOpenCustomHashSet(ShortCollection collection, ShortStrategy 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 ShortOpenCustomHashSet(ShortCollection collection, float loadFactor, ShortStrategy 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 ShortOpenCustomHashSet(java.util.Iterator<java.lang.Short> iterator,
ShortStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ShortOpenCustomHashSet(java.util.Iterator<java.lang.Short> iterator,
float loadFactor,
ShortStrategy 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 ShortOpenCustomHashSet(ShortIterator iterator, ShortStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ShortOpenCustomHashSet(ShortIterator iterator, float loadFactor, ShortStrategy 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 ShortStrategy getStrategy()
public boolean add(short o)
ShortCollectionadd in interface ShortCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Short> c)
AbstractShortCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Short>addAll in interface java.util.Set<java.lang.Short>addAll in class AbstractShortCollectionpublic boolean addAll(ShortCollection c)
ShortCollectionaddAll in interface ShortCollectionaddAll in class AbstractShortCollectionc - the collection of elements that should be addedpublic boolean contains(short o)
AbstractShortCollectioncontains in interface ShortCollectioncontains in class AbstractShortCollectiono - the element that should be searched for.public boolean remove(short o)
ShortSetpublic 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 ShortIterator iterator()
ShortCollectioniterator in interface java.lang.Iterable<java.lang.Short>iterator in interface java.util.Collection<java.lang.Short>iterator in interface java.util.Set<java.lang.Short>iterator in interface ShortCollectioniterator in interface ShortIterableiterator in interface ShortSetiterator in class AbstractShortSetCollection.iterator()public void clear()
clear in interface java.util.Collection<java.lang.Short>clear in interface java.util.Set<java.lang.Short>clear in class java.util.AbstractCollection<java.lang.Short>public int size()
size in interface java.util.Collection<java.lang.Short>size in interface java.util.Set<java.lang.Short>size in class java.util.AbstractCollection<java.lang.Short>