public class CharLinkedOpenHashSet extends CharOpenHashSet implements CharOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
CharLinkedOpenHashSet()
Default Constructor
|
CharLinkedOpenHashSet(char[] array)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenHashSet(char[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenHashSet(char[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenHashSet(char[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenHashSet(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 size
|
CharLinkedOpenHashSet(CharIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharLinkedOpenHashSet(java.util.Collection<? extends java.lang.Character> collection)
Deprecated.
|
CharLinkedOpenHashSet(java.util.Collection<? extends java.lang.Character> collection,
float loadFactor)
Deprecated.
|
CharLinkedOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
CharLinkedOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
CharLinkedOpenHashSet(java.util.Iterator<java.lang.Character> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharLinkedOpenHashSet(java.util.Iterator<java.lang.Character> 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 |
addAndMoveToFirst(char o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(char o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
CharLinkedOpenHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(CharPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
char |
findFirst(CharPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
char |
firstChar()
A method to get the first element in the set
|
void |
forEach(CharConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
<E> void |
forEach(E input,
ObjectCharConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEachIndexed(IntCharConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
CharListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
CharBidirectionalIterator |
iterator(char fromElement)
A type Specific Iterator starting from a given key
|
char |
lastChar()
A method to get the last element in the set
|
boolean |
matchesAll(CharPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(CharPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(CharPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(char o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(char o)
A specific move method to move a given key to the last index.
|
char |
pollFirstChar()
A method to get and remove the first element in the set
|
char |
pollLastChar()
A method to get and remove the last element in the set
|
char |
reduce(char identity,
CharCharUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
char |
reduce(CharCharUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
add, addAll, addAll, contains, contains, remove, remove, size, trimequals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remChar, removeAll, removeAll, retainAll, retainAll, toCharArray, toCharArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiableadd, contains, remChar, remove, removeaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArrayadd, addAll, addAll, addAll, addAll, contains, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toCharArray, toCharArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedof, sizeclearAndTrim, trimpublic CharLinkedOpenHashSet()
public CharLinkedOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic CharLinkedOpenHashSet(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenHashSet(char[] array)
array - the elements that should be put into the setpublic CharLinkedOpenHashSet(char[] 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 CharLinkedOpenHashSet(char[] 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 CharLinkedOpenHashSet(char[] 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 CharLinkedOpenHashSet(java.util.Collection<? extends java.lang.Character> collection)
collection - the set the elements should be added to the Set@Deprecated
public CharLinkedOpenHashSet(java.util.Collection<? extends java.lang.Character> 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 CharLinkedOpenHashSet(CharCollection collection)
collection - the set the elements should be added to the Setpublic CharLinkedOpenHashSet(CharCollection 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 CharLinkedOpenHashSet(java.util.Iterator<java.lang.Character> iterator)
iterator - the elements that should be added to the setpublic CharLinkedOpenHashSet(java.util.Iterator<java.lang.Character> 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 CharLinkedOpenHashSet(CharIterator iterator)
iterator - the elements that should be added to the setpublic CharLinkedOpenHashSet(CharIterator 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 addAndMoveToFirst(char o)
CharOrderedSetaddAndMoveToFirst in interface CharOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(char o)
CharOrderedSetaddAndMoveToLast in interface CharOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(char o)
CharOrderedSetmoveToFirst in interface CharOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(char o)
CharOrderedSetmoveToLast in interface CharOrderedSeto - that should be moved to the first lastpublic char firstChar()
CharOrderedSetfirstChar in interface CharOrderedSetpublic char pollFirstChar()
CharOrderedSetpollFirstChar in interface CharOrderedSetpublic char lastChar()
CharOrderedSetlastChar in interface CharOrderedSetpublic char pollLastChar()
CharOrderedSetpollLastChar in interface CharOrderedSetpublic void forEach(CharConsumer action)
CharIterableforEach in interface CharIterableforEach in class CharOpenHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntCharConsumer action)
CharIterableforEachIndexed in interface CharIterableforEachIndexed in class CharOpenHashSetaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectCharConsumer<E> action)
CharIterableforEach in interface CharIterableforEach in class CharOpenHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(CharPredicate filter)
CharIterablematchesAny in interface CharIterablematchesAny in class CharOpenHashSetfilter - that should be appliedpublic boolean matchesNone(CharPredicate filter)
CharIterablematchesNone in interface CharIterablematchesNone in class CharOpenHashSetfilter - that should be appliedpublic boolean matchesAll(CharPredicate filter)
CharIterablematchesAll in interface CharIterablematchesAll in class CharOpenHashSetfilter - that should be appliedpublic char reduce(char identity,
CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterablereduce in class CharOpenHashSetidentity - the start valueoperator - the operation that should be appliedpublic char reduce(CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterablereduce in class CharOpenHashSetoperator - the operation that should be appliedpublic char findFirst(CharPredicate filter)
CharIterablefindFirst in interface CharIterablefindFirst in class CharOpenHashSetfilter - that should be appliedpublic int count(CharPredicate filter)
CharIterablecount in interface CharIterablecount in class CharOpenHashSetfilter - that should be appliedpublic void clear()
clear in interface java.util.Collection<java.lang.Character>clear in interface java.util.Set<java.lang.Character>clear in class CharOpenHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class CharOpenHashSetsize - the amount of elements that should be allowedpublic CharListIterator iterator()
CharCollectioniterator in interface java.lang.Iterable<java.lang.Character>iterator in interface java.util.Collection<java.lang.Character>iterator in interface java.util.Set<java.lang.Character>iterator in interface CharCollectioniterator in interface CharIterableiterator in interface CharOrderedSetiterator in interface CharSetiterator in class CharOpenHashSetCollection.iterator()public CharBidirectionalIterator iterator(char fromElement)
CharOrderedSetiterator in interface CharOrderedSetfromElement - the element the iterator should start frompublic CharLinkedOpenHashSet copy()
CharCollectioncopy in interface CharCollectioncopy in interface CharOrderedSetcopy in interface CharSetcopy in class CharOpenHashSet