public class ShortLinkedOpenCustomHashSet extends ShortOpenCustomHashSet implements ShortOrderedSet
| Constructor and Description |
|---|
ShortLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
float loadFactor,
ShortStrategy strategy)
Deprecated.
|
ShortLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Short> collection,
ShortStrategy strategy)
Deprecated.
|
ShortLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
ShortStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
ShortLinkedOpenCustomHashSet(int minCapacity,
ShortStrategy strategy)
Constructor that defines the minimum capacity
|
ShortLinkedOpenCustomHashSet(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
|
ShortLinkedOpenCustomHashSet(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
|
ShortLinkedOpenCustomHashSet(short[] array,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenCustomHashSet(short[] array,
int offset,
int length,
float loadFactor,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenCustomHashSet(short[] array,
int offset,
int length,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenCustomHashSet(short[] array,
ShortStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenCustomHashSet(ShortCollection collection,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortLinkedOpenCustomHashSet(ShortCollection collection,
ShortStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortLinkedOpenCustomHashSet(ShortIterator iterator,
float loadFactor,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortLinkedOpenCustomHashSet(ShortIterator iterator,
ShortStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortLinkedOpenCustomHashSet(ShortStrategy strategy)
Default Contstructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(short o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(short o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
ShortLinkedOpenCustomHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
short |
findFirst(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
short |
firstShort()
A method to get the first element in the set
|
<E> void |
forEach(E input,
ObjectShortConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(ShortConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
ShortListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ShortBidirectionalIterator |
iterator(short fromElement)
A type Specific Iterator starting from a given key
|
short |
lastShort()
A method to get the last element in the set
|
boolean |
matchesAll(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Short2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(short o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(short o)
A specific move method to move a given key to the last index.
|
short |
pollFirstShort()
A method to get and remove the first element in the set
|
short |
pollLastShort()
A method to get and remove the last element in the set
|
short |
reduce(short identity,
ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
short |
reduce(ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
add, addAll, addAll, contains, getStrategy, remove, size, trimequals, hashCodeadd, contains, containsAll, containsAll, containsAny, containsAny, remove, removeAll, removeAll, remShort, retainAll, retainAll, toShortArray, toShortArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, contains, remove, remove, remShortaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArrayadd, addAll, addAll, addAll, addAll, contains, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toShortArray, toShortArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedclearAndTrim, trimpublic ShortLinkedOpenCustomHashSet(ShortStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 ShortLinkedOpenCustomHashSet(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 boolean addAndMoveToFirst(short o)
ShortOrderedSetaddAndMoveToFirst in interface ShortOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(short o)
ShortOrderedSetaddAndMoveToLast in interface ShortOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(short o)
ShortOrderedSetmoveToFirst in interface ShortOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(short o)
ShortOrderedSetmoveToLast in interface ShortOrderedSeto - that should be moved to the first lastpublic short firstShort()
ShortOrderedSetfirstShort in interface ShortOrderedSetpublic short pollFirstShort()
ShortOrderedSetpollFirstShort in interface ShortOrderedSetpublic short lastShort()
ShortOrderedSetlastShort in interface ShortOrderedSetpublic short pollLastShort()
ShortOrderedSetpollLastShort in interface ShortOrderedSetpublic void clear()
clear in interface java.util.Collection<java.lang.Short>clear in interface java.util.Set<java.lang.Short>clear in class ShortOpenCustomHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ShortOpenCustomHashSetsize - the amount of elements that should be allowedpublic void forEach(ShortConsumer action)
ShortIterableforEach in interface ShortIterableforEach in class ShortOpenCustomHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectShortConsumer<E> action)
ShortIterableforEach in interface ShortIterableforEach in class ShortOpenCustomHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Short2BooleanFunction filter)
ShortIterablematchesAny in interface ShortIterablematchesAny in class ShortOpenCustomHashSetfilter - that should be appliedpublic boolean matchesNone(Short2BooleanFunction filter)
ShortIterablematchesNone in interface ShortIterablematchesNone in class ShortOpenCustomHashSetfilter - that should be appliedpublic boolean matchesAll(Short2BooleanFunction filter)
ShortIterablematchesAll in interface ShortIterablematchesAll in class ShortOpenCustomHashSetfilter - that should be appliedpublic short reduce(short identity,
ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterablereduce in class ShortOpenCustomHashSetidentity - the start valueoperator - the operation that should be appliedpublic short reduce(ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterablereduce in class ShortOpenCustomHashSetoperator - the operation that should be appliedpublic short findFirst(Short2BooleanFunction filter)
ShortIterablefindFirst in interface ShortIterablefindFirst in class ShortOpenCustomHashSetfilter - that should be appliedpublic int count(Short2BooleanFunction filter)
ShortIterablecount in interface ShortIterablecount in class ShortOpenCustomHashSetfilter - that should be appliedpublic ShortListIterator 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 ShortOrderedSetiterator in interface ShortSetiterator in class ShortOpenCustomHashSetCollection.iterator()public ShortBidirectionalIterator iterator(short fromElement)
ShortOrderedSetiterator in interface ShortOrderedSetfromElement - the element the iterator should start frompublic ShortLinkedOpenCustomHashSet copy()
ShortCollectioncopy in interface ShortCollectioncopy in interface ShortOrderedSetcopy in interface ShortSetcopy in class ShortOpenCustomHashSet