public class ImmutableByteOpenHashSet extends AbstractByteSet implements ByteOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ImmutableByteOpenHashSet(byte[] array)
Helper constructor that allow to create a set from unboxed values
|
ImmutableByteOpenHashSet(byte[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableByteOpenHashSet(byte[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ImmutableByteOpenHashSet(byte[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableByteOpenHashSet(ByteCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableByteOpenHashSet(ByteCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableByteOpenHashSet(ByteIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableByteOpenHashSet(ByteIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
Deprecated.
|
ImmutableByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection,
float loadFactor)
Deprecated.
|
ImmutableByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableByteOpenHashSet(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 |
add(byte o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(ByteCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Byte> c)
Deprecated.
|
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() |
boolean |
contains(byte o)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
ImmutableByteOpenHashSet |
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
|
boolean |
remove(byte o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
int |
size() |
equals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remByte, removeAll, removeAll, retainAll, retainAll, toByteArray, toByteArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiablecontainsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, 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, sortedofpublic ImmutableByteOpenHashSet(byte[] array)
array - the elements that should be put into the setpublic ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(java.util.Collection<? extends java.lang.Byte> collection)
collection - the set the elements should be added to the Set@Deprecated
public ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(ByteCollection collection)
collection - the set the elements should be added to the Setpublic ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(java.util.Iterator<java.lang.Byte> iterator)
iterator - the elements that should be added to the setpublic ImmutableByteOpenHashSet(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 ImmutableByteOpenHashSet(ByteIterator iterator)
iterator - the elements that should be added to the setpublic ImmutableByteOpenHashSet(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 add(byte o)
ByteCollectionadd in interface ByteCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Byte>addAll in interface java.util.Set<java.lang.Byte>addAll in class AbstractByteCollectionpublic boolean addAll(ByteCollection c)
ByteCollectionaddAll in interface ByteCollectionaddAll in class AbstractByteCollectionc - the collection of elements that should be addedpublic 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 boolean contains(java.lang.Object o)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Byte>contains in interface java.util.Set<java.lang.Byte>contains in interface ByteCollectioncontains in interface ByteSetcontains in class AbstractByteCollectionpublic byte firstByte()
ByteOrderedSetfirstByte in interface ByteOrderedSetpublic byte pollFirstByte()
ByteOrderedSetpollFirstByte in interface ByteOrderedSetpublic byte lastByte()
ByteOrderedSetlastByte in interface ByteOrderedSetpublic byte pollLastByte()
ByteOrderedSetpollLastByte in interface ByteOrderedSetpublic boolean remove(java.lang.Object o)
AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Byte>remove in interface java.util.Set<java.lang.Byte>remove in interface ByteCollectionremove in interface ByteSetremove in class AbstractByteCollectionpublic boolean contains(byte o)
AbstractByteCollectioncontains in interface ByteCollectioncontains in class AbstractByteCollectiono - the element that should be searched for.public boolean remove(byte o)
ByteSetpublic void forEach(ByteConsumer action)
ByteIterableforEach in interface ByteIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntByteConsumer action)
ByteIterableforEachIndexed in interface ByteIterableaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectByteConsumer<E> action)
ByteIterableforEach in interface ByteIterableE - 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 ByteIterablefilter - that should be appliedpublic boolean matchesNone(BytePredicate filter)
ByteIterablematchesNone in interface ByteIterablefilter - that should be appliedpublic boolean matchesAll(BytePredicate filter)
ByteIterablematchesAll in interface ByteIterablefilter - that should be appliedpublic byte reduce(byte identity,
ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterableidentity - the start valueoperator - the operation that should be appliedpublic byte reduce(ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterableoperator - the operation that should be appliedpublic byte findFirst(BytePredicate filter)
ByteIterablefindFirst in interface ByteIterablefilter - that should be appliedpublic int count(BytePredicate filter)
ByteIterablecount in interface ByteIterablefilter - 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 AbstractByteSetCollection.iterator()public ByteBidirectionalIterator iterator(byte fromElement)
ByteOrderedSetiterator in interface ByteOrderedSetfromElement - the element the iterator should start frompublic ImmutableByteOpenHashSet copy()
ByteCollectioncopy in interface ByteCollectioncopy in interface ByteOrderedSetcopy in interface ByteSetcopy in class AbstractByteSetpublic void clear()
clear in interface java.util.Collection<java.lang.Byte>clear in interface java.util.Set<java.lang.Byte>clear in class java.util.AbstractCollection<java.lang.Byte>public int size()
size in interface java.util.Collection<java.lang.Byte>size in interface java.util.Set<java.lang.Byte>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Byte>