public class LongLinkedOpenCustomHashSet extends LongOpenCustomHashSet implements LongOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
LongLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor,
LongStrategy strategy)
Deprecated.
|
LongLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
LongStrategy strategy)
Deprecated.
|
LongLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
LongStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
LongLinkedOpenCustomHashSet(int minCapacity,
LongStrategy strategy)
Constructor that defines the minimum capacity
|
LongLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenCustomHashSet(long[] array,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenCustomHashSet(long[] array,
int offset,
int length,
float loadFactor,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenCustomHashSet(long[] array,
int offset,
int length,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenCustomHashSet(long[] array,
LongStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
LongLinkedOpenCustomHashSet(LongCollection collection,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongLinkedOpenCustomHashSet(LongCollection collection,
LongStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
LongLinkedOpenCustomHashSet(LongIterator iterator,
float loadFactor,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenCustomHashSet(LongIterator iterator,
LongStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
LongLinkedOpenCustomHashSet(LongStrategy strategy)
Default Contstructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(long o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(long 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
|
LongLinkedOpenCustomHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
long |
findFirst(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
long |
firstLong()
A method to get the first element in the set
|
<E> void |
forEach(E input,
ObjectLongConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(LongConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
void |
forEachIndexed(IntLongConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
LongListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
LongBidirectionalIterator |
iterator(long fromElement)
A type Specific Iterator starting from a given key
|
long |
lastLong()
A method to get the last element in the set
|
boolean |
matchesAll(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(long o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(long o)
A specific move method to move a given key to the last index.
|
long |
pollFirstLong()
A method to get and remove the first element in the set
|
long |
pollLastLong()
A method to get and remove the last element in the set
|
long |
reduce(long identity,
LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
long |
reduce(LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
add, addAll, addAll, contains, getStrategy, remove, size, trimequals, hashCodeadd, contains, containsAll, containsAll, containsAny, containsAny, remLong, remove, removeAll, removeAll, retainAll, retainAll, toLongArray, toLongArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, contains, remLong, remove, removeaddAll, 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, toLongArray, toLongArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedof, sizeclearAndTrim, trimpublic LongLinkedOpenCustomHashSet(LongStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongLinkedOpenCustomHashSet(int minCapacity,
LongStrategy 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 LongLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
LongStrategy 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 LongLinkedOpenCustomHashSet(long[] array,
LongStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongLinkedOpenCustomHashSet(long[] array,
float loadFactor,
LongStrategy 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 LongLinkedOpenCustomHashSet(long[] array,
int offset,
int length,
LongStrategy 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 LongLinkedOpenCustomHashSet(long[] array,
int offset,
int length,
float loadFactor,
LongStrategy 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 LongLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
LongStrategy 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 LongLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor,
LongStrategy 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 LongLinkedOpenCustomHashSet(LongCollection collection, LongStrategy 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 LongLinkedOpenCustomHashSet(LongCollection collection, float loadFactor, LongStrategy 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 LongLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
LongStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor,
LongStrategy 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 LongLinkedOpenCustomHashSet(LongIterator iterator, LongStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic LongLinkedOpenCustomHashSet(LongIterator iterator, float loadFactor, LongStrategy 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(long o)
LongOrderedSetaddAndMoveToFirst in interface LongOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(long o)
LongOrderedSetaddAndMoveToLast in interface LongOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(long o)
LongOrderedSetmoveToFirst in interface LongOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(long o)
LongOrderedSetmoveToLast in interface LongOrderedSeto - that should be moved to the first lastpublic long firstLong()
LongOrderedSetfirstLong in interface LongOrderedSetpublic long pollFirstLong()
LongOrderedSetpollFirstLong in interface LongOrderedSetpublic long lastLong()
LongOrderedSetlastLong in interface LongOrderedSetpublic long pollLastLong()
LongOrderedSetpollLastLong in interface LongOrderedSetpublic void clear()
clear in interface java.util.Collection<java.lang.Long>clear in interface java.util.Set<java.lang.Long>clear in class LongOpenCustomHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class LongOpenCustomHashSetsize - the amount of elements that should be allowedpublic void forEach(LongConsumer action)
LongIterableforEach in interface LongIterableforEach in class LongOpenCustomHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntLongConsumer action)
LongIterableforEachIndexed in interface LongIterableforEachIndexed in class LongOpenCustomHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectLongConsumer<E> action)
LongIterableforEach in interface LongIterableforEach in class LongOpenCustomHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.LongPredicate filter)
LongIterablematchesAny in interface LongIterablematchesAny in class LongOpenCustomHashSetfilter - that should be appliedpublic boolean matchesNone(java.util.function.LongPredicate filter)
LongIterablematchesNone in interface LongIterablematchesNone in class LongOpenCustomHashSetfilter - that should be appliedpublic boolean matchesAll(java.util.function.LongPredicate filter)
LongIterablematchesAll in interface LongIterablematchesAll in class LongOpenCustomHashSetfilter - that should be appliedpublic long reduce(long identity,
LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterablereduce in class LongOpenCustomHashSetidentity - the start valueoperator - the operation that should be appliedpublic long reduce(LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterablereduce in class LongOpenCustomHashSetoperator - the operation that should be appliedpublic long findFirst(java.util.function.LongPredicate filter)
LongIterablefindFirst in interface LongIterablefindFirst in class LongOpenCustomHashSetfilter - that should be appliedpublic int count(java.util.function.LongPredicate filter)
LongIterablecount in interface LongIterablecount in class LongOpenCustomHashSetfilter - that should be appliedpublic LongListIterator iterator()
LongCollectioniterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.util.Set<java.lang.Long>iterator in interface LongCollectioniterator in interface LongIterableiterator in interface LongOrderedSetiterator in interface LongSetiterator in class LongOpenCustomHashSetCollection.iterator()public LongBidirectionalIterator iterator(long fromElement)
LongOrderedSetiterator in interface LongOrderedSetfromElement - the element the iterator should start frompublic LongLinkedOpenCustomHashSet copy()
LongCollectioncopy in interface LongCollectioncopy in interface LongOrderedSetcopy in interface LongSetcopy in class LongOpenCustomHashSet