public class ByteLinkedOpenHashSet extends ByteOpenHashSet implements ByteOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ByteLinkedOpenHashSet()
Default Constructor
|
ByteLinkedOpenHashSet(byte[] array)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenHashSet(byte[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenHashSet(byte[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenHashSet(byte[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ByteLinkedOpenHashSet(ByteCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteLinkedOpenHashSet(ByteCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteLinkedOpenHashSet(ByteIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenHashSet(ByteIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
Deprecated.
|
ByteLinkedOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor)
Deprecated.
|
ByteLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
ByteLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
ByteLinkedOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteLinkedOpenHashSet(java.util.Iterator<java.lang.Byte> 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(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
|
ByteLinkedOpenHashSet |
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, contains, remove, remove, size, trimequals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remByte, 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 ByteLinkedOpenHashSet()
public ByteLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic ByteLinkedOpenHashSet(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 ByteLinkedOpenHashSet(byte[] array)
array - the elements that should be put into the setpublic ByteLinkedOpenHashSet(byte[] 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 ByteLinkedOpenHashSet(byte[] 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 ByteLinkedOpenHashSet(byte[] 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 ByteLinkedOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
collection - the set the elements should be added to the Set@Deprecated
public ByteLinkedOpenHashSet(java.util.Collection<? extends java.lang.Byte> 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 ByteLinkedOpenHashSet(ByteCollection collection)
collection - the set the elements should be added to the Setpublic ByteLinkedOpenHashSet(ByteCollection 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 ByteLinkedOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
iterator - the elements that should be added to the setpublic ByteLinkedOpenHashSet(java.util.Iterator<java.lang.Byte> 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 ByteLinkedOpenHashSet(ByteIterator iterator)
iterator - the elements that should be added to the setpublic ByteLinkedOpenHashSet(ByteIterator 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(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 forEach(ByteConsumer action)
ByteIterableforEach in interface ByteIterableforEach in class ByteOpenHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntByteConsumer action)
ByteIterableforEachIndexed in interface ByteIterableforEachIndexed in class ByteOpenHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectByteConsumer<E> action)
ByteIterableforEach in interface ByteIterableforEach in class ByteOpenHashSetE - 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 ByteOpenHashSetfilter - that should be appliedpublic boolean matchesNone(BytePredicate filter)
ByteIterablematchesNone in interface ByteIterablematchesNone in class ByteOpenHashSetfilter - that should be appliedpublic boolean matchesAll(BytePredicate filter)
ByteIterablematchesAll in interface ByteIterablematchesAll in class ByteOpenHashSetfilter - that should be appliedpublic byte reduce(byte identity,
ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterablereduce in class ByteOpenHashSetidentity - the start valueoperator - the operation that should be appliedpublic byte reduce(ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterablereduce in class ByteOpenHashSetoperator - the operation that should be appliedpublic byte findFirst(BytePredicate filter)
ByteIterablefindFirst in interface ByteIterablefindFirst in class ByteOpenHashSetfilter - that should be appliedpublic int count(BytePredicate filter)
ByteIterablecount in interface ByteIterablecount in class ByteOpenHashSetfilter - that should be appliedpublic void clear()
clear in interface java.util.Collection<java.lang.Byte>clear in interface java.util.Set<java.lang.Byte>clear in class ByteOpenHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class ByteOpenHashSetsize - the amount of elements that should be allowedpublic 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 ByteOpenHashSetCollection.iterator()public ByteBidirectionalIterator iterator(byte fromElement)
ByteOrderedSetiterator in interface ByteOrderedSetfromElement - the element the iterator should start frompublic ByteLinkedOpenHashSet copy()
ByteCollectioncopy in interface ByteCollectioncopy in interface ByteOrderedSetcopy in interface ByteSetcopy in class ByteOpenHashSet