java.lang.Object
java.util.AbstractCollection<Byte>
speiger.src.collections.bytes.collections.AbstractByteCollection
speiger.src.collections.bytes.sets.AbstractByteSet
speiger.src.collections.bytes.sets.ByteAVLTreeSet
- Alle implementierten Schnittstellen:
Iterable<Byte>,Collection<Byte>,NavigableSet<Byte>,Set<Byte>,SortedSet<Byte>,ByteCollection,ByteIterable,ByteNavigableSet,ByteSet,ByteSortedSet,ISizeProvider
A Simple Type Specific AVL TreeSet implementation that reduces boxing/unboxing.
It is using a bit more memory then FastUtil,
but it saves a lot of Performance on the Optimized removal and iteration logic.
Which makes the implementation actually useable and does not get outperformed by Javas default implementation.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefault ConstructorByteAVLTreeSet(byte[] array) Helper constructor that allow to create a set from an arrayByteAVLTreeSet(byte[] array, int offset, int length) Helper constructor that allow to create a set from an arrayByteAVLTreeSet(byte[] array, int offset, int length, ByteComparator comp) Helper constructor that allow to create a set from an arrayByteAVLTreeSet(byte[] array, ByteComparator comp) Helper constructor that allow to create a set from an arrayByteAVLTreeSet(Collection<? extends Byte> collection) Veraltet.ByteAVLTreeSet(Collection<? extends Byte> collection, ByteComparator comp) Veraltet.ByteAVLTreeSet(Iterator<Byte> iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeByteAVLTreeSet(Iterator<Byte> iterator, ByteComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeByteAVLTreeSet(ByteCollection collection) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.ByteAVLTreeSet(ByteCollection collection, ByteComparator comp) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.ByteAVLTreeSet(ByteIterator iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeByteAVLTreeSet(ByteIterator iterator, ByteComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeByteAVLTreeSet(ByteComparator comp) Constructor that allows to define the sorterByteAVLTreeSet(ByteSortedSet sortedSet) A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(byte o) A Type-Specific add function to reduce (un)boxingbyteceiling(byte e) A Type Specific ceiling method to reduce boxing/unboxing.voidclear()A Type Specific Comparator methodbooleancontains(byte e) A Type-Specific implementation of contains.booleancopy()A Function that does a shallow clone of the Collection itself.intcount(BytePredicate filter) Helper function to reduce stream usage that allows to count the valid elements.bytefindFirst(BytePredicate filter) Helper function to reduce stream usage that allows to filter for the first match.byteA method to get the first element in the setbytefloor(byte e) A Type Specific floor method to reduce boxing/unboxing.<E> voidforEach(E input, ObjectByteConsumer<E> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidforEach(ByteConsumer action) A Type Specific foreach function that reduces (un)boxingvoidforEachIndexed(IntByteConsumer action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.byteA Helper method to get the max value for SubSets.byteA Helper method to get the min value for SubSets.headSet(byte toElement, boolean inclusive) A Type Specific HeadSet method to reduce boxing/unboxingbytehigher(byte e) A Type Specific higher method to reduce boxing/unboxing.iterator()Returns a Type-Specific Iterator to reduce (un)boxingiterator(byte fromElement) A type Specific Iterator starting from a given keybytelastByte()A method to get the last element in the setbytelower(byte e) A Type Specific lower method to reduce boxing/unboxing.booleanmatchesAll(BytePredicate filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(BytePredicate filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(BytePredicate filter) Helper function to reduce stream usage that allows to filter for no matches.byteA method to get and remove the first element in the setbyteA method to get and remove the last element in the setbytereduce(byte identity, ByteByteUnaryOperator operator) Performs a reduction on the elements of this Iterablebytereduce(ByteByteUnaryOperator operator) Performs a reduction on the elements of this Iterablebooleanremove(byte o) A Type Specific remove function to reduce boxing/unboxingbooleanvoidsetDefaultMaxValue(byte value) A Helper method to set the max value for SubSets.voidsetDefaultMinValue(byte value) A Helper method to set the min value for SubSets.intsize()subSet(byte fromElement, boolean fromInclusive, byte toElement, boolean toInclusive) A Type Specific SubSet method to reduce boxing/unboxingtailSet(byte fromElement, boolean inclusive) A Type Specific TailSet method to reduce boxing/unboxingObject[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.byte[]toByteArray(byte[] a) A Type-Specific implementation of toArray.Von Klasse geerbte Methoden speiger.src.collections.bytes.sets.AbstractByteSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.bytes.collections.AbstractByteCollection
add, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remByte, removeAll, removeAll, retainAll, retainAll, toByteArrayVon Klasse geerbte Methoden java.util.AbstractCollection
isEmpty, removeAll, retainAll, toStringVon Schnittstelle geerbte Methoden speiger.src.collections.bytes.collections.ByteCollection
addAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, spliterator, toByteArrayVon Schnittstelle geerbte Methoden speiger.src.collections.bytes.collections.ByteIterable
arrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.bytes.sets.ByteNavigableSet
first, headSet, headSet, headSet, last, pollFirst, pollLast, spliterator, subSet, subSet, subSet, synchronize, synchronize, tailSet, tailSet, tailSet, unmodifiableVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, stream, toArray
-
Konstruktordetails
-
ByteAVLTreeSet
public ByteAVLTreeSet()Default Constructor -
ByteAVLTreeSet
Constructor that allows to define the sorter- Parameter:
comp- the function that decides how the tree is sorted, can be null
-
ByteAVLTreeSet
public ByteAVLTreeSet(byte[] array) Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be used
-
ByteAVLTreeSet
public ByteAVLTreeSet(byte[] array, int offset, int length) Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be usedoffset- the starting index within the arraylength- the amount of elements that are within the array- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
ByteAVLTreeSet
Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be usedcomp- the sorter of the tree, can be null
-
ByteAVLTreeSet
Helper constructor that allow to create a set from an array- Parameter:
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 null- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
ByteAVLTreeSet
A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.- Parameter:
sortedSet- the set the elements should be added to the TreeSet- Note:
- this also includes the Comparator if present
-
ByteAVLTreeSet
Veraltet.A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the TreeSet
-
ByteAVLTreeSet
Veraltet.A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the TreeSetcomp- the sorter of the tree, can be null
-
ByteAVLTreeSet
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the TreeSet
-
ByteAVLTreeSet
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.- Parameter:
collection- the set the elements should be added to the TreeSetcomp- the sorter of the tree, can be null
-
ByteAVLTreeSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the set
-
ByteAVLTreeSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the setcomp- the sorter of the tree, can be null
-
ByteAVLTreeSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the set
-
ByteAVLTreeSet
A Helper constructor that allows to create a set from a iterator of an unknown size- Parameter:
iterator- the elements that should be added to the setcomp- the sorter of the tree, can be null
-
-
Methodendetails
-
setDefaultMaxValue
public void setDefaultMaxValue(byte value) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Helper method to set the max value for SubSets. (Default: byte.MIN_VALUE)- Angegeben von:
setDefaultMaxValuein SchnittstelleByteNavigableSet- Parameter:
value- the new max value
-
getDefaultMaxValue
public byte getDefaultMaxValue()Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Helper method to get the max value for SubSets.- Angegeben von:
getDefaultMaxValuein SchnittstelleByteNavigableSet- Gibt zurück:
- the default max value.
-
setDefaultMinValue
public void setDefaultMinValue(byte value) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Helper method to set the min value for SubSets. (Default: byte.MAX_VALUE)- Angegeben von:
setDefaultMinValuein SchnittstelleByteNavigableSet- Parameter:
value- the new min value
-
getDefaultMinValue
public byte getDefaultMinValue()Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Helper method to get the min value for SubSets.- Angegeben von:
getDefaultMinValuein SchnittstelleByteNavigableSet- Gibt zurück:
- the default min value.
-
add
public boolean add(byte o) Beschreibung aus Schnittstelle kopiert:ByteCollectionA Type-Specific add function to reduce (un)boxing- Angegeben von:
addin SchnittstelleByteCollection- Parameter:
o- the element that should be added- Gibt zurück:
- true if the element was added to the collection
-
lower
public byte lower(byte e) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific lower method to reduce boxing/unboxing.- Angegeben von:
lowerin SchnittstelleByteNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower key that can be found
-
floor
public byte floor(byte e) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific floor method to reduce boxing/unboxing.- Angegeben von:
floorin SchnittstelleByteNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower or equal key that can be found
-
higher
public byte higher(byte e) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific higher method to reduce boxing/unboxing.- Angegeben von:
higherin SchnittstelleByteNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher key that can be found
-
ceiling
public byte ceiling(byte e) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific ceiling method to reduce boxing/unboxing.- Angegeben von:
ceilingin SchnittstelleByteNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher or equal key that can be found
-
lower
- Angegeben von:
lowerin SchnittstelleByteNavigableSet- Angegeben von:
lowerin SchnittstelleNavigableSet<Byte>
-
floor
- Angegeben von:
floorin SchnittstelleByteNavigableSet- Angegeben von:
floorin SchnittstelleNavigableSet<Byte>
-
higher
- Angegeben von:
higherin SchnittstelleByteNavigableSet- Angegeben von:
higherin SchnittstelleNavigableSet<Byte>
-
ceiling
- Angegeben von:
ceilingin SchnittstelleByteNavigableSet- Angegeben von:
ceilingin SchnittstelleNavigableSet<Byte>
-
forEach
Beschreibung aus Schnittstelle kopiert:ByteIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleByteIterable- Parameter:
action- The action to be performed for each element- Siehe auch:
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:ByteIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleByteIterable- Parameter:
action- The action to be performed for each element
-
forEach
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleByteIterable- Typparameter:
E- the generic type of the Object- Parameter:
input- the object that should be includedaction- The action to be performed for each element
-
matchesAny
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleByteIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleByteIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleByteIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
findFirst
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleByteIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
reduce
Beschreibung aus Schnittstelle kopiert:ByteIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleByteIterable- Parameter:
identity- the start valueoperator- the operation that should be applied- Gibt zurück:
- the reduction result, returns identity if nothing was found
-
reduce
Beschreibung aus Schnittstelle kopiert:ByteIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleByteIterable- Parameter:
operator- the operation that should be applied- Gibt zurück:
- the reduction result, returns null value if nothing was found
-
count
Beschreibung aus Schnittstelle kopiert:ByteIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleByteIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
contains
public boolean contains(byte e) Beschreibung aus Klasse kopiert:AbstractByteCollectionA Type-Specific implementation of contains. This implementation iterates over the elements and returns true if the value match.- Angegeben von:
containsin SchnittstelleByteCollection- Setzt außer Kraft:
containsin KlasseAbstractByteCollection- Parameter:
e- the element that should be searched for.- Gibt zurück:
- true if the value was found.
-
contains
Beschreibung aus Klasse kopiert:AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
containsin SchnittstelleByteCollection- Angegeben von:
containsin SchnittstelleByteSet- Angegeben von:
containsin SchnittstelleCollection<Byte>- Angegeben von:
containsin SchnittstelleSet<Byte>- Setzt außer Kraft:
containsin KlasseAbstractByteCollection
-
firstByte
public byte firstByte()Beschreibung aus Schnittstelle kopiert:ByteSortedSetA method to get the first element in the set- Angegeben von:
firstBytein SchnittstelleByteSortedSet- Gibt zurück:
- first element in the set
-
lastByte
public byte lastByte()Beschreibung aus Schnittstelle kopiert:ByteSortedSetA method to get the last element in the set- Angegeben von:
lastBytein SchnittstelleByteSortedSet- Gibt zurück:
- last element in the set
-
remove
public boolean remove(byte o) Beschreibung aus Schnittstelle kopiert:ByteSetA Type Specific remove function to reduce boxing/unboxing -
remove
Beschreibung aus Klasse kopiert:AbstractByteCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
removein SchnittstelleByteCollection- Angegeben von:
removein SchnittstelleByteSet- Angegeben von:
removein SchnittstelleCollection<Byte>- Angegeben von:
removein SchnittstelleSet<Byte>- Setzt außer Kraft:
removein KlasseAbstractByteCollection
-
pollFirstByte
public byte pollFirstByte()Beschreibung aus Schnittstelle kopiert:ByteSortedSetA method to get and remove the first element in the set- Angegeben von:
pollFirstBytein SchnittstelleByteSortedSet- Gibt zurück:
- first element in the set
-
pollLastByte
public byte pollLastByte()Beschreibung aus Schnittstelle kopiert:ByteSortedSetA method to get and remove the last element in the set- Angegeben von:
pollLastBytein SchnittstelleByteSortedSet- Gibt zurück:
- last element in the set
-
size
public int size()- Angegeben von:
sizein SchnittstelleCollection<Byte>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleSet<Byte>- Angegeben von:
sizein KlasseAbstractCollection<Byte>- Gibt zurück:
- the size of the implementing Collection
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Byte>- Angegeben von:
clearin SchnittstelleSet<Byte>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Byte>
-
toByteArray
public byte[] toByteArray(byte[] a) Beschreibung aus Klasse kopiert:AbstractByteCollectionA Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.- Angegeben von:
toByteArrayin SchnittstelleByteCollection- Setzt außer Kraft:
toByteArrayin KlasseAbstractByteCollection- Parameter:
a- array that the elements should be injected to. If null or to small a new array with the right size is created- Gibt zurück:
- an array containing all of the elements in this collection
- Siehe auch:
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Byte>- Angegeben von:
toArrayin SchnittstelleSet<Byte>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Byte>
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Byte>- Angegeben von:
toArrayin SchnittstelleSet<Byte>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Byte>
-
copy
Beschreibung aus Schnittstelle kopiert:ByteCollectionA Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk- Angegeben von:
copyin SchnittstelleByteCollection- Angegeben von:
copyin SchnittstelleByteNavigableSet- Angegeben von:
copyin SchnittstelleByteSet- Angegeben von:
copyin SchnittstelleByteSortedSet- Setzt außer Kraft:
copyin KlasseAbstractByteSet- Gibt zurück:
- a Shallow Copy of the collection
-
comparator
Beschreibung aus Schnittstelle kopiert:ByteSortedSetA Type Specific Comparator method- Angegeben von:
comparatorin SchnittstelleByteSortedSet- Angegeben von:
comparatorin SchnittstelleSortedSet<Byte>- Gibt zurück:
- the type specific comparator
-
iterator
Beschreibung aus Schnittstelle kopiert:ByteCollectionReturns a Type-Specific Iterator to reduce (un)boxing- Angegeben von:
iteratorin SchnittstelleByteCollection- Angegeben von:
iteratorin SchnittstelleByteIterable- Angegeben von:
iteratorin SchnittstelleByteNavigableSet- Angegeben von:
iteratorin SchnittstelleByteSet- Angegeben von:
iteratorin SchnittstelleByteSortedSet- Angegeben von:
iteratorin SchnittstelleCollection<Byte>- Angegeben von:
iteratorin SchnittstelleIterable<Byte>- Angegeben von:
iteratorin SchnittstelleNavigableSet<Byte>- Angegeben von:
iteratorin SchnittstelleSet<Byte>- Angegeben von:
iteratorin KlasseAbstractByteSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
iterator
Beschreibung aus Schnittstelle kopiert:ByteSortedSetA type Specific Iterator starting from a given key- Angegeben von:
iteratorin SchnittstelleByteSortedSet- Parameter:
fromElement- the element the iterator should start from- Gibt zurück:
- a iterator starting from the given element
-
descendingIterator
- Angegeben von:
descendingIteratorin SchnittstelleByteNavigableSet- Angegeben von:
descendingIteratorin SchnittstelleNavigableSet<Byte>- Gibt zurück:
- a Type Specific desendingIterator
-
subSet
public ByteNavigableSet subSet(byte fromElement, boolean fromInclusive, byte toElement, boolean toInclusive) Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific SubSet method to reduce boxing/unboxing- Angegeben von:
subSetin SchnittstelleByteNavigableSet- Parameter:
fromElement- where the SubSet should startfromInclusive- if the fromElement is inclusive or nottoElement- where the SubSet should endtoInclusive- if the toElement is inclusive or not- Gibt zurück:
- a SubSet that is within the range of the desired range
-
headSet
Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific HeadSet method to reduce boxing/unboxing- Angegeben von:
headSetin SchnittstelleByteNavigableSet- Parameter:
toElement- where the HeadSet should endinclusive- if the toElement is inclusive or not- Gibt zurück:
- a HeadSet that is within the range of the desired range
-
tailSet
Beschreibung aus Schnittstelle kopiert:ByteNavigableSetA Type Specific TailSet method to reduce boxing/unboxing- Angegeben von:
tailSetin SchnittstelleByteNavigableSet- Parameter:
fromElement- where the TailSet should startinclusive- if the fromElement is inclusive or not- Gibt zurück:
- a TailSet that is within the range of the desired range
-
descendingSet
- Angegeben von:
descendingSetin SchnittstelleByteNavigableSet- Angegeben von:
descendingSetin SchnittstelleNavigableSet<Byte>- Gibt zurück:
- a Type Specific desendingSet
-