Modul speiger.src.collections
Klasse CharLinkedOpenHashSet
java.lang.Object
java.util.AbstractCollection<Character>
speiger.src.collections.chars.collections.AbstractCharCollection
speiger.src.collections.chars.sets.AbstractCharSet
speiger.src.collections.chars.sets.CharOpenHashSet
speiger.src.collections.chars.sets.CharLinkedOpenHashSet
- Alle implementierten Schnittstellen:
Iterable<Character>,Collection<Character>,Set<Character>,CharCollection,CharIterable,CharOrderedSet,CharSet,ISizeProvider,ITrimmable
A Type Specific LinkedHashMap implementation that uses specific arrays to create links between nodes to remove the wrapping of elements
to greatly reduce memory usage. In Addition adding some helper methods to move around elements.
This implementation of SortedSet does not support SubSet of any kind. It implements the interface due to sortability and first/last access
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefault ConstructorCharLinkedOpenHashSet(char[] array) Helper constructor that allow to create a set from unboxed valuesCharLinkedOpenHashSet(char[] array, float loadFactor) Helper constructor that allow to create a set from unboxed valuesCharLinkedOpenHashSet(char[] array, int offset, int length) Helper constructor that allow to create a set from unboxed valuesCharLinkedOpenHashSet(char[] array, int offset, int length, float loadFactor) Helper constructor that allow to create a set from unboxed valuesCharLinkedOpenHashSet(int minCapacity) Constructor that defines the minimum capacityCharLinkedOpenHashSet(int minCapacity, float loadFactor) Constructor that defines the minimum capacity and load factorCharLinkedOpenHashSet(Collection<? extends Character> collection) Veraltet.CharLinkedOpenHashSet(Collection<? extends Character> collection, float loadFactor) Veraltet.CharLinkedOpenHashSet(Iterator<Character> iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharLinkedOpenHashSet(Iterator<Character> iterator, float loadFactor) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharLinkedOpenHashSet(CharCollection collection) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.CharLinkedOpenHashSet(CharCollection collection, float loadFactor) A Helper constructor that allows to create a Set with exactly the same values as the provided collection.CharLinkedOpenHashSet(CharIterator iterator) A Helper constructor that allows to create a set from a iterator of an unknown sizeCharLinkedOpenHashSet(CharIterator iterator, float loadFactor) A Helper constructor that allows to create a set from a iterator of an unknown size -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanaddAndMoveToFirst(char o) A customized add method that allows you to insert into the first index.booleanaddAndMoveToLast(char o) A customized add method that allows you to insert into the last index.voidclear()voidclearAndTrim(int size) Trims the collection down to the requested size and clears all elements while doing socopy()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 set<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.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 setbooleanmatchesAll(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.booleanmoveToFirst(char o) A specific move method to move a given key to the first index.booleanmoveToLast(char o) A specific move method to move a given key to the last index.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 IterableObject[]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.CharOpenHashSet
add, addAll, addAll, contains, contains, remove, remove, size, trimVon Klasse geerbte Methoden speiger.src.collections.chars.sets.AbstractCharSet
equals, hashCodeVon Klasse geerbte Methoden speiger.src.collections.chars.collections.AbstractCharCollection
add, 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
add, addAll, addAll, addAll, addAll, contains, 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.CharOrderedSet
spliterator, synchronize, synchronize, unmodifiableVon Schnittstelle geerbte Methoden speiger.src.collections.chars.sets.CharSet
add, contains, remChar, remove, removeVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, stream, toArrayVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ISizeProvider
sizeVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ITrimmable
clearAndTrim, trim
-
Konstruktordetails
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet()Default Constructor -
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(int minCapacity) Constructor that defines the minimum capacity- Parameter:
minCapacity- the minimum capacity the HashSet is allowed to be.- Löst aus:
IllegalStateException- if the minimum capacity is negative
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(int minCapacity, float loadFactor) Constructor that defines the minimum capacity and load factor- Parameter:
minCapacity- the minimum capacity the HashSet is allowed to be.loadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the minimum capacity is negativeIllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(char[] array) Helper constructor that allow to create a set from unboxed values- Parameter:
array- the elements that should be put into the set
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(char[] array, float loadFactor) Helper constructor that allow to create a set from unboxed values- Parameter:
array- the elements that should be put into the setloadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(char[] array, int offset, int length) Helper constructor that allow to create a set from unboxed values- Parameter:
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 array- Löst aus:
IllegalStateException- if offset and length causes to step outside of the arrays range
-
CharLinkedOpenHashSet
public CharLinkedOpenHashSet(char[] array, int offset, int length, float loadFactor) Helper constructor that allow to create a set from unboxed values- Parameter:
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 resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1IllegalStateException- if offset and length causes to step outside of the arrays range
-
CharLinkedOpenHashSet
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 Set
-
CharLinkedOpenHashSet
@Deprecated public CharLinkedOpenHashSet(Collection<? extends Character> collection, float loadFactor) 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 SetloadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
CharLinkedOpenHashSet
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 Set
-
CharLinkedOpenHashSet
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 SetloadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
CharLinkedOpenHashSet
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
-
CharLinkedOpenHashSet
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 setloadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
CharLinkedOpenHashSet
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
-
CharLinkedOpenHashSet
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 setloadFactor- the percentage of how full the backing array can be before they resize- Löst aus:
IllegalStateException- if the loadfactor is either below/equal to 0 or above/equal to 1
-
-
Methodendetails
-
addAndMoveToFirst
public boolean addAndMoveToFirst(char o) Beschreibung aus Schnittstelle kopiert:CharOrderedSetA customized add method that allows you to insert into the first index.- Angegeben von:
addAndMoveToFirstin SchnittstelleCharOrderedSet- Parameter:
o- the element that should be inserted- Gibt zurück:
- true if it was added
- Siehe auch:
-
addAndMoveToLast
public boolean addAndMoveToLast(char o) Beschreibung aus Schnittstelle kopiert:CharOrderedSetA customized add method that allows you to insert into the last index.- Angegeben von:
addAndMoveToLastin SchnittstelleCharOrderedSet- Parameter:
o- the element that should be inserted- Gibt zurück:
- true if it was added
- Siehe auch:
-
moveToFirst
public boolean moveToFirst(char o) Beschreibung aus Schnittstelle kopiert:CharOrderedSetA specific move method to move a given key to the first index.- Angegeben von:
moveToFirstin SchnittstelleCharOrderedSet- Parameter:
o- that should be moved to the first index- Gibt zurück:
- true if the value was moved.
-
moveToLast
public boolean moveToLast(char o) Beschreibung aus Schnittstelle kopiert:CharOrderedSetA specific move method to move a given key to the last index.- Angegeben von:
moveToLastin SchnittstelleCharOrderedSet- Parameter:
o- that should be moved to the first last- Gibt zurück:
- true if the value was moved.
-
firstChar
public char firstChar()Beschreibung aus Schnittstelle kopiert:CharOrderedSetA method to get the first element in the set- Angegeben von:
firstCharin SchnittstelleCharOrderedSet- Gibt zurück:
- first element in the set
-
pollFirstChar
public char pollFirstChar()Beschreibung aus Schnittstelle kopiert:CharOrderedSetA method to get and remove the first element in the set- Angegeben von:
pollFirstCharin SchnittstelleCharOrderedSet- Gibt zurück:
- first element in the set
-
lastChar
public char lastChar()Beschreibung aus Schnittstelle kopiert:CharOrderedSetA method to get the last element in the set- Angegeben von:
lastCharin SchnittstelleCharOrderedSet- Gibt zurück:
- last element in the set
-
pollLastChar
public char pollLastChar()Beschreibung aus Schnittstelle kopiert:CharOrderedSetA method to get and remove the last element in the set- Angegeben von:
pollLastCharin SchnittstelleCharOrderedSet- Gibt zurück:
- last element in the set
-
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 KlasseCharOpenHashSet- 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 KlasseCharOpenHashSet
-
toArray
Veraltet.- Angegeben von:
toArrayin SchnittstelleCollection<Character>- Angegeben von:
toArrayin SchnittstelleSet<Character>- Setzt außer Kraft:
toArrayin KlasseCharOpenHashSet
-
forEach
Beschreibung aus Schnittstelle kopiert:CharIterableA Type Specific foreach function that reduces (un)boxing- Angegeben von:
forEachin SchnittstelleCharIterable- Setzt außer Kraft:
forEachin KlasseCharOpenHashSet- 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- Setzt außer Kraft:
forEachIndexedin KlasseCharOpenHashSet- 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- Setzt außer Kraft:
forEachin KlasseCharOpenHashSet- 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- Setzt außer Kraft:
matchesAnyin KlasseCharOpenHashSet- 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- Setzt außer Kraft:
matchesNonein KlasseCharOpenHashSet- 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- Setzt außer Kraft:
matchesAllin KlasseCharOpenHashSet- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
reduce
Beschreibung aus Schnittstelle kopiert:CharIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleCharIterable- Setzt außer Kraft:
reducein KlasseCharOpenHashSet- 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- Setzt außer Kraft:
reducein KlasseCharOpenHashSet- Parameter:
operator- the operation that should be applied- Gibt zurück:
- the reduction result, returns null value if nothing was found
-
findFirst
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleCharIterable- Setzt außer Kraft:
findFirstin KlasseCharOpenHashSet- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
count
Beschreibung aus Schnittstelle kopiert:CharIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleCharIterable- Setzt außer Kraft:
countin KlasseCharOpenHashSet- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<Character>- Angegeben von:
clearin SchnittstelleSet<Character>- Setzt außer Kraft:
clearin KlasseCharOpenHashSet
-
clearAndTrim
public void clearAndTrim(int size) Beschreibung aus Schnittstelle kopiert:ITrimmableTrims the collection down to the requested size and clears all elements while doing so- Angegeben von:
clearAndTrimin SchnittstelleITrimmable- Setzt außer Kraft:
clearAndTrimin KlasseCharOpenHashSet- Parameter:
size- the amount of elements that should be allowed
-
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 SchnittstelleCharOrderedSet- Angegeben von:
iteratorin SchnittstelleCharSet- Angegeben von:
iteratorin SchnittstelleCollection<Character>- Angegeben von:
iteratorin SchnittstelleIterable<Character>- Angegeben von:
iteratorin SchnittstelleSet<Character>- Setzt außer Kraft:
iteratorin KlasseCharOpenHashSet- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
iterator
Beschreibung aus Schnittstelle kopiert:CharOrderedSetA type Specific Iterator starting from a given key- Angegeben von:
iteratorin SchnittstelleCharOrderedSet- Parameter:
fromElement- the element the iterator should start from- Gibt zurück:
- a iterator starting from the given element
-
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 SchnittstelleCharOrderedSet- Angegeben von:
copyin SchnittstelleCharSet- Setzt außer Kraft:
copyin KlasseCharOpenHashSet- Gibt zurück:
- a Shallow Copy of the collection
-