public class ByteLinkedOpenCustomHashSet extends ByteOpenCustomHashSet implements ByteOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ByteLinkedOpenCustomHashSet(byte[] array,
ByteStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenCustomHashSet(byte[] array,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenCustomHashSet(byte[] array,
int offset,
int length,
ByteStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenCustomHashSet(byte[] array,
int offset,
int length,
float loadFactor,
ByteStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenCustomHashSet(ByteCollection collection,
ByteStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteLinkedOpenCustomHashSet(ByteCollection collection,
float loadFactor,
ByteStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteLinkedOpenCustomHashSet(ByteIterator iterator,
ByteStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenCustomHashSet(ByteIterator iterator,
float loadFactor,
ByteStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenCustomHashSet(ByteStrategy strategy)
Default Contstructor
|
ByteLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Byte> collection,
ByteStrategy strategy)
Deprecated.
|
ByteLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor,
ByteStrategy strategy)
Deprecated.
|
ByteLinkedOpenCustomHashSet(int minCapacity,
ByteStrategy strategy)
Constructor that defines the minimum capacity
|
ByteLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
ByteStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
ByteLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Byte> iterator,
ByteStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Byte> iterator,
float loadFactor,
ByteStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAndMoveToFirst(byte o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(byte 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
|
ByteLinkedOpenCustomHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(BytePredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
byte |
findFirst(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
byte |
firstByte()
A method to get the first element in the set
|
void |
forEach(ByteConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectByteConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEachIndexed(IntByteConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
ByteListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
ByteBidirectionalIterator |
iterator(byte fromElement)
A type Specific Iterator starting from a given key
|
byte |
lastByte()
A method to get the last element in the set
|
boolean |
matchesAll(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(byte o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(byte o)
A specific move method to move a given key to the last index.
|
byte |
pollFirstByte()
A method to get and remove the first element in the set
|
byte |
pollLastByte()
A method to get and remove the last element in the set
|
byte |
reduce(byte identity,
ByteByteUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
byte |
reduce(ByteByteUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
add, addAll, addAll, contains, getStrategy, remove, size, trimequals, hashCodeadd, contains, containsAll, containsAll, containsAny, containsAny, remByte, remove, removeAll, removeAll, retainAll, retainAll, toByteArray, toByteArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, contains, remByte, 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, toByteArray, toByteArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedof, sizeclearAndTrim, trimpublic ByteLinkedOpenCustomHashSet(ByteStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ByteLinkedOpenCustomHashSet(int minCapacity,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(byte[] array,
ByteStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ByteLinkedOpenCustomHashSet(byte[] array,
float loadFactor,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(byte[] array,
int offset,
int length,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(byte[] array,
int offset,
int length,
float loadFactor,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Byte> collection,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(ByteCollection collection, ByteStrategy 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 ByteLinkedOpenCustomHashSet(ByteCollection collection, float loadFactor, ByteStrategy 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 ByteLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Byte> iterator,
ByteStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ByteLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Byte> iterator,
float loadFactor,
ByteStrategy 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 ByteLinkedOpenCustomHashSet(ByteIterator iterator, ByteStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic ByteLinkedOpenCustomHashSet(ByteIterator iterator, float loadFactor, ByteStrategy 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(byte o)
ByteOrderedSetaddAndMoveToFirst in interface ByteOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(byte o)
ByteOrderedSetaddAndMoveToLast in interface ByteOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(byte o)
ByteOrderedSetmoveToFirst in interface ByteOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(byte o)
ByteOrderedSetmoveToLast in interface ByteOrderedSeto - that should be moved to the first lastpublic byte firstByte()
ByteOrderedSetfirstByte in interface ByteOrderedSetpublic byte pollFirstByte()
ByteOrderedSetpollFirstByte in interface ByteOrderedSetpublic byte lastByte()
ByteOrderedSetlastByte in interface ByteOrderedSetpublic byte pollLastByte()
ByteOrderedSetpollLastByte in interface ByteOrderedSetpublic void clear()
clear in interface java.util.Collection<java.lang.Byte>clear in interface java.util.Set<java.lang.Byte>clear in class ByteOpenCustomHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ByteOpenCustomHashSetsize - the amount of elements that should be allowedpublic void forEach(ByteConsumer action)
ByteIterableforEach in interface ByteIterableforEach in class ByteOpenCustomHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntByteConsumer action)
ByteIterableforEachIndexed in interface ByteIterableforEachIndexed in class ByteOpenCustomHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectByteConsumer<E> action)
ByteIterableforEach in interface ByteIterableforEach in class ByteOpenCustomHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(BytePredicate filter)
ByteIterablematchesAny in interface ByteIterablematchesAny in class ByteOpenCustomHashSetfilter - that should be appliedpublic boolean matchesNone(BytePredicate filter)
ByteIterablematchesNone in interface ByteIterablematchesNone in class ByteOpenCustomHashSetfilter - that should be appliedpublic boolean matchesAll(BytePredicate filter)
ByteIterablematchesAll in interface ByteIterablematchesAll in class ByteOpenCustomHashSetfilter - that should be appliedpublic byte reduce(byte identity,
ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterablereduce in class ByteOpenCustomHashSetidentity - the start valueoperator - the operation that should be appliedpublic byte reduce(ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterablereduce in class ByteOpenCustomHashSetoperator - the operation that should be appliedpublic byte findFirst(BytePredicate filter)
ByteIterablefindFirst in interface ByteIterablefindFirst in class ByteOpenCustomHashSetfilter - that should be appliedpublic int count(BytePredicate filter)
ByteIterablecount in interface ByteIterablecount in class ByteOpenCustomHashSetfilter - that should be appliedpublic ByteListIterator iterator()
ByteCollectioniterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in interface java.util.Set<java.lang.Byte>iterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface ByteOrderedSetiterator in interface ByteSetiterator in class ByteOpenCustomHashSetCollection.iterator()public ByteBidirectionalIterator iterator(byte fromElement)
ByteOrderedSetiterator in interface ByteOrderedSetfromElement - the element the iterator should start frompublic ByteLinkedOpenCustomHashSet copy()
ByteCollectioncopy in interface ByteCollectioncopy in interface ByteOrderedSetcopy in interface ByteSetcopy in class ByteOpenCustomHashSet