public class ByteRBTreeSet extends AbstractByteSet implements ByteNavigableSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ByteRBTreeSet()
Default Constructor
|
ByteRBTreeSet(byte[] array)
Helper constructor that allow to create a set from an array
|
ByteRBTreeSet(byte[] array,
ByteComparator comp)
Helper constructor that allow to create a set from an array
|
ByteRBTreeSet(byte[] array,
int offset,
int length)
Helper constructor that allow to create a set from an array
|
ByteRBTreeSet(byte[] array,
int offset,
int length,
ByteComparator comp)
Helper constructor that allow to create a set from an array
|
ByteRBTreeSet(ByteCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteRBTreeSet(ByteCollection collection,
ByteComparator comp)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ByteRBTreeSet(ByteComparator comp)
Constructor that allows to define the sorter
|
ByteRBTreeSet(ByteIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteRBTreeSet(ByteIterator iterator,
ByteComparator comp)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteRBTreeSet(ByteSortedSet sortedSet)
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
|
ByteRBTreeSet(java.util.Collection<? extends java.lang.Byte> collection)
Deprecated.
|
ByteRBTreeSet(java.util.Collection<? extends java.lang.Byte> collection,
ByteComparator comp)
Deprecated.
|
ByteRBTreeSet(java.util.Iterator<java.lang.Byte> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ByteRBTreeSet(java.util.Iterator<java.lang.Byte> iterator,
ByteComparator comp)
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
|
byte |
ceiling(byte e)
A Type Specific ceiling method to reduce boxing/unboxing.
|
java.lang.Byte |
ceiling(java.lang.Byte e) |
void |
clear() |
ByteComparator |
comparator()
A Type Specific Comparator method
|
boolean |
contains(byte e)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object e)
This default implementation delegates to the corresponding type-specific function.
|
ByteRBTreeSet |
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.
|
ByteBidirectionalIterator |
descendingIterator() |
ByteNavigableSet |
descendingSet() |
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
|
byte |
floor(byte e)
A Type Specific floor method to reduce boxing/unboxing.
|
java.lang.Byte |
floor(java.lang.Byte e) |
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.
|
byte |
getDefaultMaxValue()
A Helper method to get the max value for SubSets.
|
byte |
getDefaultMinValue()
A Helper method to get the min value for SubSets.
|
ByteNavigableSet |
headSet(byte toElement,
boolean inclusive)
A Type Specific HeadSet method to reduce boxing/unboxing
|
byte |
higher(byte e)
A Type Specific higher method to reduce boxing/unboxing.
|
java.lang.Byte |
higher(java.lang.Byte e) |
ByteBidirectionalIterator |
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
|
byte |
lower(byte e)
A Type Specific lower method to reduce boxing/unboxing.
|
java.lang.Byte |
lower(java.lang.Byte e) |
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.
|
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.
|
void |
setDefaultMaxValue(byte value)
A Helper method to set the max value for SubSets.
|
void |
setDefaultMinValue(byte value)
A Helper method to set the min value for SubSets.
|
int |
size() |
ByteNavigableSet |
subSet(byte fromElement,
boolean fromInclusive,
byte toElement,
boolean toInclusive)
A Type Specific SubSet method to reduce boxing/unboxing
|
ByteNavigableSet |
tailSet(byte fromElement,
boolean inclusive)
A Type Specific TailSet method to reduce boxing/unboxing
|
equals, hashCodeadd, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remByte, removeAll, removeAll, retainAll, retainAll, toByteArray, toByteArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringfirst, headSet, headSet, headSet, last, pollFirst, pollLast, spliterator, subSet, subSet, subSet, synchronize, synchronize, tailSet, tailSet, tailSet, unmodifiableaddAll, addAll, 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 ByteRBTreeSet()
public ByteRBTreeSet(ByteComparator comp)
comp - the function that decides how the tree is sorted, can be nullpublic ByteRBTreeSet(byte[] array)
array - the elements that should be usedpublic ByteRBTreeSet(byte[] array,
int offset,
int length)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arrayjava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ByteRBTreeSet(byte[] array,
ByteComparator comp)
array - the elements that should be usedcomp - the sorter of the tree, can be nullpublic ByteRBTreeSet(byte[] array,
int offset,
int length,
ByteComparator comp)
array - the elements that should be usedoffset - the starting index within the arraylength - the amount of elements that are within the arraycomp - the sorter of the tree, can be nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic ByteRBTreeSet(ByteSortedSet sortedSet)
sortedSet - the set the elements should be added to the TreeSet@Deprecated public ByteRBTreeSet(java.util.Collection<? extends java.lang.Byte> collection)
collection - the set the elements should be added to the TreeSet@Deprecated
public ByteRBTreeSet(java.util.Collection<? extends java.lang.Byte> collection,
ByteComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ByteRBTreeSet(ByteCollection collection)
collection - the set the elements should be added to the TreeSetpublic ByteRBTreeSet(ByteCollection collection, ByteComparator comp)
collection - the set the elements should be added to the TreeSetcomp - the sorter of the tree, can be nullpublic ByteRBTreeSet(java.util.Iterator<java.lang.Byte> iterator)
iterator - the elements that should be added to the setpublic ByteRBTreeSet(java.util.Iterator<java.lang.Byte> iterator,
ByteComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic ByteRBTreeSet(ByteIterator iterator)
iterator - the elements that should be added to the setpublic ByteRBTreeSet(ByteIterator iterator, ByteComparator comp)
iterator - the elements that should be added to the setcomp - the sorter of the tree, can be nullpublic void setDefaultMaxValue(byte value)
ByteNavigableSetsetDefaultMaxValue in interface ByteNavigableSetvalue - the new max valuepublic byte getDefaultMaxValue()
ByteNavigableSetgetDefaultMaxValue in interface ByteNavigableSetpublic void setDefaultMinValue(byte value)
ByteNavigableSetsetDefaultMinValue in interface ByteNavigableSetvalue - the new min valuepublic byte getDefaultMinValue()
ByteNavigableSetgetDefaultMinValue in interface ByteNavigableSetpublic boolean add(byte o)
ByteCollectionadd in interface ByteCollectiono - the element that should be addedpublic byte lower(byte e)
ByteNavigableSetlower in interface ByteNavigableSete - that should be compared with.public byte floor(byte e)
ByteNavigableSetfloor in interface ByteNavigableSete - that should be compared with.public byte higher(byte e)
ByteNavigableSethigher in interface ByteNavigableSete - that should be compared with.public byte ceiling(byte e)
ByteNavigableSetceiling in interface ByteNavigableSete - that should be compared with.public java.lang.Byte lower(java.lang.Byte e)
lower in interface java.util.NavigableSet<java.lang.Byte>lower in interface ByteNavigableSetpublic java.lang.Byte floor(java.lang.Byte e)
floor in interface java.util.NavigableSet<java.lang.Byte>floor in interface ByteNavigableSetpublic java.lang.Byte higher(java.lang.Byte e)
higher in interface java.util.NavigableSet<java.lang.Byte>higher in interface ByteNavigableSetpublic java.lang.Byte ceiling(java.lang.Byte e)
ceiling in interface java.util.NavigableSet<java.lang.Byte>ceiling in interface ByteNavigableSetpublic 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 boolean contains(byte e)
AbstractByteCollectioncontains in interface ByteCollectioncontains in class AbstractByteCollectione - the element that should be searched for.public boolean contains(java.lang.Object e)
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()
ByteSortedSetfirstByte in interface ByteSortedSetpublic byte lastByte()
ByteSortedSetlastByte in interface ByteSortedSetpublic boolean remove(byte o)
ByteSetpublic 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 byte pollFirstByte()
ByteSortedSetpollFirstByte in interface ByteSortedSetpublic byte pollLastByte()
ByteSortedSetpollLastByte in interface ByteSortedSetpublic 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>public 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 ByteRBTreeSet copy()
ByteCollectioncopy in interface ByteCollectioncopy in interface ByteNavigableSetcopy in interface ByteSetcopy in interface ByteSortedSetcopy in class AbstractByteSetpublic ByteComparator comparator()
ByteSortedSetcomparator in interface java.util.SortedSet<java.lang.Byte>comparator in interface ByteSortedSetpublic ByteBidirectionalIterator iterator()
ByteCollectioniterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in interface java.util.NavigableSet<java.lang.Byte>iterator in interface java.util.Set<java.lang.Byte>iterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface ByteNavigableSetiterator in interface ByteSetiterator in interface ByteSortedSetiterator in class AbstractByteSetCollection.iterator()public ByteBidirectionalIterator iterator(byte fromElement)
ByteSortedSetiterator in interface ByteSortedSetfromElement - the element the iterator should start frompublic ByteBidirectionalIterator descendingIterator()
descendingIterator in interface java.util.NavigableSet<java.lang.Byte>descendingIterator in interface ByteNavigableSetpublic ByteNavigableSet subSet(byte fromElement, boolean fromInclusive, byte toElement, boolean toInclusive)
ByteNavigableSetsubSet in interface ByteNavigableSetfromElement - where the SubSet should startfromInclusive - if the fromElement is inclusive or nottoElement - where the SubSet should endtoInclusive - if the toElement is inclusive or notpublic ByteNavigableSet headSet(byte toElement, boolean inclusive)
ByteNavigableSetheadSet in interface ByteNavigableSettoElement - where the HeadSet should endinclusive - if the toElement is inclusive or notpublic ByteNavigableSet tailSet(byte fromElement, boolean inclusive)
ByteNavigableSettailSet in interface ByteNavigableSetfromElement - where the TailSet should startinclusive - if the fromElement is inclusive or notpublic ByteNavigableSet descendingSet()
descendingSet in interface java.util.NavigableSet<java.lang.Byte>descendingSet in interface ByteNavigableSet