public class ShortLinkedOpenHashSet extends ShortOpenHashSet implements ShortOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ShortLinkedOpenHashSet()
Default Constructor
|
ShortLinkedOpenHashSet(java.util.Collection<? extends java.lang.Short> collection)
Deprecated.
|
ShortLinkedOpenHashSet(java.util.Collection<? extends java.lang.Short> collection,
float loadFactor)
Deprecated.
|
ShortLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ShortLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ShortLinkedOpenHashSet(java.util.Iterator<java.lang.Short> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortLinkedOpenHashSet(java.util.Iterator<java.lang.Short> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortLinkedOpenHashSet(short[] array)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenHashSet(short[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenHashSet(short[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenHashSet(short[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ShortLinkedOpenHashSet(ShortCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortLinkedOpenHashSet(ShortCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ShortLinkedOpenHashSet(ShortIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ShortLinkedOpenHashSet(ShortIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| 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
|
ShortLinkedOpenHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(ShortPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
short |
findFirst(ShortPredicate 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
|
void |
forEachIndexed(IntShortConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
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(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(ShortPredicate 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, contains, remove, remove, size, trimequals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, 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, repeat, sortedof, sizeclearAndTrim, trimpublic ShortLinkedOpenHashSet()
public ShortLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ShortLinkedOpenHashSet(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 ShortLinkedOpenHashSet(short[] array)
array - the elements that should be put into the setpublic ShortLinkedOpenHashSet(short[] 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 ShortLinkedOpenHashSet(short[] 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 ShortLinkedOpenHashSet(short[] 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 ShortLinkedOpenHashSet(java.util.Collection<? extends java.lang.Short> collection)
collection - the set the elements should be added to the Set@Deprecated
public ShortLinkedOpenHashSet(java.util.Collection<? extends java.lang.Short> 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 ShortLinkedOpenHashSet(ShortCollection collection)
collection - the set the elements should be added to the Setpublic ShortLinkedOpenHashSet(ShortCollection 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 ShortLinkedOpenHashSet(java.util.Iterator<java.lang.Short> iterator)
iterator - the elements that should be added to the setpublic ShortLinkedOpenHashSet(java.util.Iterator<java.lang.Short> 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 ShortLinkedOpenHashSet(ShortIterator iterator)
iterator - the elements that should be added to the setpublic ShortLinkedOpenHashSet(ShortIterator 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 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 forEach(ShortConsumer action)
ShortIterableforEach in interface ShortIterableforEach in class ShortOpenHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntShortConsumer action)
ShortIterableforEachIndexed in interface ShortIterableforEachIndexed in class ShortOpenHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectShortConsumer<E> action)
ShortIterableforEach in interface ShortIterableforEach in class ShortOpenHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(ShortPredicate filter)
ShortIterablematchesAny in interface ShortIterablematchesAny in class ShortOpenHashSetfilter - that should be appliedpublic boolean matchesNone(ShortPredicate filter)
ShortIterablematchesNone in interface ShortIterablematchesNone in class ShortOpenHashSetfilter - that should be appliedpublic boolean matchesAll(ShortPredicate filter)
ShortIterablematchesAll in interface ShortIterablematchesAll in class ShortOpenHashSetfilter - that should be appliedpublic short reduce(short identity,
ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterablereduce in class ShortOpenHashSetidentity - the start valueoperator - the operation that should be appliedpublic short reduce(ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterablereduce in class ShortOpenHashSetoperator - the operation that should be appliedpublic short findFirst(ShortPredicate filter)
ShortIterablefindFirst in interface ShortIterablefindFirst in class ShortOpenHashSetfilter - that should be appliedpublic int count(ShortPredicate filter)
ShortIterablecount in interface ShortIterablecount in class ShortOpenHashSetfilter - that should be appliedpublic void clear()
clear in interface java.util.Collection<java.lang.Short>clear in interface java.util.Set<java.lang.Short>clear in class ShortOpenHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ShortOpenHashSetsize - the amount of elements that should be allowedpublic 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 ShortOpenHashSetCollection.iterator()public ShortBidirectionalIterator iterator(short fromElement)
ShortOrderedSetiterator in interface ShortOrderedSetfromElement - the element the iterator should start frompublic ShortLinkedOpenHashSet copy()
ShortCollectioncopy in interface ShortCollectioncopy in interface ShortOrderedSetcopy in interface ShortSetcopy in class ShortOpenHashSet