java.lang.Object
java.util.AbstractCollection<Character>
speiger.src.collections.chars.collections.AbstractCharCollection
speiger.src.collections.chars.sets.AbstractCharSet
speiger.src.collections.chars.sets.CharAVLTreeSet
- Alle implementierten Schnittstellen:
Iterable<Character>,Collection<Character>,NavigableSet<Character>,Set<Character>,SortedSet<Character>,CharCollection,CharIterable,CharNavigableSet,CharSet,CharSortedSet,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 ConstructorCharAVLTreeSet(char[] array) Helper constructor that allow to create a set from an arrayCharAVLTreeSet(char[] array, int offset, int length) Helper constructor that allow to create a set from an arrayCharAVLTreeSet(char[] array, int offset, int length, CharComparator comp) Helper constructor that allow to create a set from an arrayCharAVLTreeSet(char[] array, CharComparator comp) Helper constructor that allow to create a set from an arrayCharAVLTreeSet(Collection<? extends Character> collection) Veraltet.CharAVLTreeSet(Collection<? extends Character> collection, CharComparator comp) Veraltet.CharAVLTreeSet(Iterator<Character> iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharAVLTreeSet(Iterator<Character> iterator, CharComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharAVLTreeSet(CharCollection collection) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.CharAVLTreeSet(CharCollection collection, CharComparator comp) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.CharAVLTreeSet(CharIterator iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharAVLTreeSet(CharIterator iterator, CharComparator comp) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharAVLTreeSet(CharComparator comp) Constructor that allows to define the sorterCharAVLTreeSet(CharSortedSet sortedSet) A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanadd(char o) A Type-Specific add function to reduce (un)boxingcharceiling(char e) A Type Specific ceiling method to reduce boxing/unboxing.voidclear()A Type Specific Comparator methodbooleancontains(char e) A Type-Specific implementation of contains.booleancopy()A Function that does a shallow clone of the Collection itself.intcount(CharPredicate filter) Helper function to reduce stream usage that allows to count the valid elements.charfindFirst(CharPredicate filter) Helper function to reduce stream usage that allows to filter for the first match.charA method to get the first element in the setcharfloor(char e) A Type Specific floor method to reduce boxing/unboxing.<E> voidforEach(E input, ObjectCharConsumer<E> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidforEach(CharConsumer action) A Type Specific foreach function that reduces (un)boxingvoidforEachIndexed(IntCharConsumer action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.charA Helper method to get the max value for SubSets.charA Helper method to get the min value for SubSets.headSet(char toElement, boolean inclusive) A Type Specific HeadSet method to reduce boxing/unboxingcharhigher(char e) A Type Specific higher method to reduce boxing/unboxing.iterator()Returns a Type-Specific Iterator to reduce (un)boxingiterator(char fromElement) A type Specific Iterator starting from a given keycharlastChar()A method to get the last element in the setcharlower(char e) A Type Specific lower method to reduce boxing/unboxing.booleanmatchesAll(CharPredicate filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(CharPredicate filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(CharPredicate filter) Helper function to reduce stream usage that allows to filter for no matches.charA method to get and remove the first element in the setcharA method to get and remove the last element in the setcharreduce(char identity, CharCharUnaryOperator operator) Performs a reduction on the elements of this Iterablecharreduce(CharCharUnaryOperator operator) Performs a reduction on the elements of this Iterablebooleanremove(char o) A Type Specific remove function to reduce boxing/unboxingbooleanvoidsetDefaultMaxValue(char value) A Helper method to set the max value for SubSets.voidsetDefaultMinValue(char value) A Helper method to set the min value for SubSets.intsize()subSet(char fromElement, boolean fromInclusive, char toElement, boolean toInclusive) A Type Specific SubSet method to reduce boxing/unboxingtailSet(char fromElement, boolean inclusive) A Type Specific TailSet method to reduce boxing/unboxingObject[]toArray()Veraltet.<E> E[]toArray(E[] a) Veraltet.char[]toCharArray(char[] a) A Type-Specific implementation of toArray.Von Klasse geerbte Methoden speiger.src.collections.chars.sets.AbstractCharSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.chars.collections.AbstractCharCollection
add, addAll, addAll, containsAll, containsAll, containsAny, containsAny, remChar, removeAll, removeAll, retainAll, retainAll, toCharArrayVon Klasse geerbte Methoden java.util.AbstractCollection
isEmpty, removeAll, retainAll, toStringVon Schnittstelle geerbte Methoden speiger.src.collections.chars.collections.CharCollection
addAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, spliterator, toCharArrayVon Schnittstelle geerbte Methoden speiger.src.collections.chars.collections.CharIterable
arrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedVon Schnittstelle geerbte Methoden speiger.src.collections.chars.sets.CharNavigableSet
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
-
CharAVLTreeSet
public CharAVLTreeSet()Default Constructor -
CharAVLTreeSet
Constructor that allows to define the sorter- Parameter:
comp- the function that decides how the tree is sorted, can be null
-
CharAVLTreeSet
public CharAVLTreeSet(char[] array) Helper constructor that allow to create a set from an array- Parameter:
array- the elements that should be used
-
CharAVLTreeSet
public CharAVLTreeSet(char[] 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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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
-
CharAVLTreeSet
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(char value) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Helper method to set the max value for SubSets. (Default: char.MIN_VALUE)- Angegeben von:
setDefaultMaxValuein SchnittstelleCharNavigableSet- Parameter:
value- the new max value
-
getDefaultMaxValue
public char getDefaultMaxValue()Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Helper method to get the max value for SubSets.- Angegeben von:
getDefaultMaxValuein SchnittstelleCharNavigableSet- Gibt zurück:
- the default max value.
-
setDefaultMinValue
public void setDefaultMinValue(char value) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Helper method to set the min value for SubSets. (Default: char.MAX_VALUE)- Angegeben von:
setDefaultMinValuein SchnittstelleCharNavigableSet- Parameter:
value- the new min value
-
getDefaultMinValue
public char getDefaultMinValue()Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Helper method to get the min value for SubSets.- Angegeben von:
getDefaultMinValuein SchnittstelleCharNavigableSet- Gibt zurück:
- the default min value.
-
add
public boolean add(char o) Beschreibung aus Schnittstelle kopiert:CharCollectionA Type-Specific add function to reduce (un)boxing- Angegeben von:
addin SchnittstelleCharCollection- Parameter:
o- the element that should be added- Gibt zurück:
- true if the element was added to the collection
-
lower
public char lower(char e) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Type Specific lower method to reduce boxing/unboxing.- Angegeben von:
lowerin SchnittstelleCharNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower key that can be found
-
floor
public char floor(char e) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Type Specific floor method to reduce boxing/unboxing.- Angegeben von:
floorin SchnittstelleCharNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the greatest lower or equal key that can be found
-
higher
public char higher(char e) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Type Specific higher method to reduce boxing/unboxing.- Angegeben von:
higherin SchnittstelleCharNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher key that can be found
-
ceiling
public char ceiling(char e) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Type Specific ceiling method to reduce boxing/unboxing.- Angegeben von:
ceilingin SchnittstelleCharNavigableSet- Parameter:
e- that should be compared with.- Gibt zurück:
- the lowest higher or equal key that can be found
-
lower
- Angegeben von:
lowerin SchnittstelleCharNavigableSet- Angegeben von:
lowerin SchnittstelleNavigableSet<Character>
-
floor
- Angegeben von:
floorin SchnittstelleCharNavigableSet- Angegeben von:
floorin SchnittstelleNavigableSet<Character>
-
higher
- Angegeben von:
higherin SchnittstelleCharNavigableSet- Angegeben von:
higherin SchnittstelleNavigableSet<Character>
-
ceiling
- Angegeben von:
ceilingin SchnittstelleCharNavigableSet- Angegeben von:
ceilingin SchnittstelleNavigableSet<Character>
-
forEach
Beschreibung aus Schnittstelle kopiert:CharIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleCharIterable- Parameter:
action- The action to be performed for each element- Siehe auch:
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:CharIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleCharIterable- Parameter:
action- The action to be performed for each element
-
forEach
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleCharIterable- 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:CharIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleCharIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleCharIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleCharIterable- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
findFirst
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleCharIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
reduce
Beschreibung aus Schnittstelle kopiert:CharIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleCharIterable- 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:CharIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleCharIterable- 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:CharIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleCharIterable- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
contains
public boolean contains(char e) Beschreibung aus Klasse kopiert:AbstractCharCollectionA Type-Specific implementation of contains. This implementation iterates over the elements and returns true if the value match.- Angegeben von:
containsin SchnittstelleCharCollection- Setzt außer Kraft:
containsin KlasseAbstractCharCollection- Parameter:
e- the element that should be searched for.- Gibt zurück:
- true if the value was found.
-
contains
Beschreibung aus Klasse kopiert:AbstractCharCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
containsin SchnittstelleCharCollection- Angegeben von:
containsin SchnittstelleCharSet- Angegeben von:
containsin SchnittstelleCollection<Character>- Angegeben von:
containsin SchnittstelleSet<Character>- Setzt außer Kraft:
containsin KlasseAbstractCharCollection
-
firstChar
public char firstChar()Beschreibung aus Schnittstelle kopiert:CharSortedSetA method to get the first element in the set- Angegeben von:
firstCharin SchnittstelleCharSortedSet- Gibt zurück:
- first element in the set
-
lastChar
public char lastChar()Beschreibung aus Schnittstelle kopiert:CharSortedSetA method to get the last element in the set- Angegeben von:
lastCharin SchnittstelleCharSortedSet- Gibt zurück:
- last element in the set
-
remove
public boolean remove(char o) Beschreibung aus Schnittstelle kopiert:CharSetA Type Specific remove function to reduce boxing/unboxing -
remove
Beschreibung aus Klasse kopiert:AbstractCharCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
- Angegeben von:
removein SchnittstelleCharCollection- Angegeben von:
removein SchnittstelleCharSet- Angegeben von:
removein SchnittstelleCollection<Character>- Angegeben von:
removein SchnittstelleSet<Character>- Setzt außer Kraft:
removein KlasseAbstractCharCollection
-
pollFirstChar
public char pollFirstChar()Beschreibung aus Schnittstelle kopiert:CharSortedSetA method to get and remove the first element in the set- Angegeben von:
pollFirstCharin SchnittstelleCharSortedSet- Gibt zurück:
- first element in the set
-
pollLastChar
public char pollLastChar()Beschreibung aus Schnittstelle kopiert:CharSortedSetA method to get and remove the last element in the set- Angegeben von:
pollLastCharin SchnittstelleCharSortedSet- Gibt zurück:
- last element in the set
-
size
public int size()- Angegeben von:
sizein SchnittstelleCollection<Character>- Angegeben von:
sizein SchnittstelleISizeProvider- Angegeben von:
sizein SchnittstelleSet<Character>- Angegeben von:
sizein KlasseAbstractCollection<Character>- Gibt zurück:
- the size of the implementing Collection
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Character>- Angegeben von:
clearin SchnittstelleSet<Character>- Setzt außer Kraft:
clearin KlasseAbstractCollection<Character>
-
toCharArray
public char[] toCharArray(char[] a) Beschreibung aus Klasse kopiert:AbstractCharCollectionA Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.- Angegeben von:
toCharArrayin SchnittstelleCharCollection- Setzt außer Kraft:
toCharArrayin KlasseAbstractCharCollection- 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<Character>- Angegeben von:
toArrayin SchnittstelleSet<Character>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Character>
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Character>- Angegeben von:
toArrayin SchnittstelleSet<Character>- Setzt außer Kraft:
toArrayin KlasseAbstractCollection<Character>
-
copy
Beschreibung aus Schnittstelle kopiert:CharCollectionA 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 SchnittstelleCharCollection- Angegeben von:
copyin SchnittstelleCharNavigableSet- Angegeben von:
copyin SchnittstelleCharSet- Angegeben von:
copyin SchnittstelleCharSortedSet- Setzt außer Kraft:
copyin KlasseAbstractCharSet- Gibt zurück:
- a Shallow Copy of the collection
-
comparator
Beschreibung aus Schnittstelle kopiert:CharSortedSetA Type Specific Comparator method- Angegeben von:
comparatorin SchnittstelleCharSortedSet- Angegeben von:
comparatorin SchnittstelleSortedSet<Character>- Gibt zurück:
- the type specific comparator
-
iterator
Beschreibung aus Schnittstelle kopiert:CharCollectionReturns a Type-Specific Iterator to reduce (un)boxing- Angegeben von:
iteratorin SchnittstelleCharCollection- Angegeben von:
iteratorin SchnittstelleCharIterable- Angegeben von:
iteratorin SchnittstelleCharNavigableSet- Angegeben von:
iteratorin SchnittstelleCharSet- Angegeben von:
iteratorin SchnittstelleCharSortedSet- Angegeben von:
iteratorin SchnittstelleCollection<Character>- Angegeben von:
iteratorin SchnittstelleIterable<Character>- Angegeben von:
iteratorin SchnittstelleNavigableSet<Character>- Angegeben von:
iteratorin SchnittstelleSet<Character>- Angegeben von:
iteratorin KlasseAbstractCharSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
iterator
Beschreibung aus Schnittstelle kopiert:CharSortedSetA type Specific Iterator starting from a given key- Angegeben von:
iteratorin SchnittstelleCharSortedSet- Parameter:
fromElement- the element the iterator should start from- Gibt zurück:
- a iterator starting from the given element
-
descendingIterator
- Angegeben von:
descendingIteratorin SchnittstelleCharNavigableSet- Angegeben von:
descendingIteratorin SchnittstelleNavigableSet<Character>- Gibt zurück:
- a Type Specific desendingIterator
-
subSet
public CharNavigableSet subSet(char fromElement, boolean fromInclusive, char toElement, boolean toInclusive) Beschreibung aus Schnittstelle kopiert:CharNavigableSetA Type Specific SubSet method to reduce boxing/unboxing- Angegeben von:
subSetin SchnittstelleCharNavigableSet- 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:CharNavigableSetA Type Specific HeadSet method to reduce boxing/unboxing- Angegeben von:
headSetin SchnittstelleCharNavigableSet- 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:CharNavigableSetA Type Specific TailSet method to reduce boxing/unboxing- Angegeben von:
tailSetin SchnittstelleCharNavigableSet- 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 SchnittstelleCharNavigableSet- Angegeben von:
descendingSetin SchnittstelleNavigableSet<Character>- Gibt zurück:
- a Type Specific desendingSet
-