public class CharLinkedOpenCustomHashSet extends CharOpenCustomHashSet implements CharOrderedSet
| Constructor and Description |
|---|
CharLinkedOpenCustomHashSet(char[] array,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenCustomHashSet(char[] array,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenCustomHashSet(char[] array,
int offset,
int length,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenCustomHashSet(char[] array,
int offset,
int length,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharLinkedOpenCustomHashSet(CharCollection collection,
CharStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharLinkedOpenCustomHashSet(CharCollection collection,
float loadFactor,
CharStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharLinkedOpenCustomHashSet(CharIterator iterator,
CharStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharLinkedOpenCustomHashSet(CharIterator iterator,
float loadFactor,
CharStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharLinkedOpenCustomHashSet(CharStrategy strategy)
Default Contstructor
|
CharLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
CharStrategy strategy)
Deprecated.
|
CharLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
float loadFactor,
CharStrategy strategy)
Deprecated.
|
CharLinkedOpenCustomHashSet(int minCapacity,
CharStrategy strategy)
Constructor that defines the minimum capacity
|
CharLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
CharStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
CharLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Character> iterator,
CharStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Character> iterator,
float loadFactor,
CharStrategy strategy)
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
|
CharLinkedOpenCustomHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
char |
findFirst(Char2BooleanFunction 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.
|
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(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Char2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Char2BooleanFunction 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, getStrategy, remove, size, trimequals, hashCodeadd, contains, containsAll, containsAll, containsAny, containsAny, remChar, remove, 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, sortedclearAndTrim, trimpublic CharLinkedOpenCustomHashSet(CharStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharLinkedOpenCustomHashSet(int minCapacity,
CharStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativepublic CharLinkedOpenCustomHashSet(int minCapacity,
float loadFactor,
CharStrategy strategy)
minCapacity - the minimum capacity the HashSet is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenCustomHashSet(char[] array,
CharStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharLinkedOpenCustomHashSet(char[] array,
float loadFactor,
CharStrategy strategy)
array - the elements that should be put into the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenCustomHashSet(char[] array,
int offset,
int length,
CharStrategy strategy)
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 arraystrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if offset and length causes to step outside of the arrays rangepublic CharLinkedOpenCustomHashSet(char[] array,
int offset,
int length,
float loadFactor,
CharStrategy strategy)
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 resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 CharLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
CharStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is null@Deprecated
public CharLinkedOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
float loadFactor,
CharStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenCustomHashSet(CharCollection collection, CharStrategy strategy)
collection - the set the elements should be added to the Setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharLinkedOpenCustomHashSet(CharCollection collection, float loadFactor, CharStrategy strategy)
collection - the set the elements should be added to the SetloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Character> iterator,
CharStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharLinkedOpenCustomHashSet(java.util.Iterator<java.lang.Character> iterator,
float loadFactor,
CharStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public CharLinkedOpenCustomHashSet(CharIterator iterator, CharStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharLinkedOpenCustomHashSet(CharIterator iterator, float loadFactor, CharStrategy strategy)
iterator - the elements that should be added to the setloadFactor - the percentage of how full the backing array can be before they resizestrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nulljava.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 clear()
clear in interface java.util.Collection<java.lang.Character>clear in interface java.util.Set<java.lang.Character>clear in class CharOpenCustomHashSetpublic void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmableclearAndTrim in class CharOpenCustomHashSetsize - the amount of elements that should be allowedpublic void forEach(CharConsumer action)
CharIterableforEach in interface CharIterableforEach in class CharOpenCustomHashSetaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectCharConsumer<E> action)
CharIterableforEach in interface CharIterableforEach in class CharOpenCustomHashSetE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Char2BooleanFunction filter)
CharIterablematchesAny in interface CharIterablematchesAny in class CharOpenCustomHashSetfilter - that should be appliedpublic boolean matchesNone(Char2BooleanFunction filter)
CharIterablematchesNone in interface CharIterablematchesNone in class CharOpenCustomHashSetfilter - that should be appliedpublic boolean matchesAll(Char2BooleanFunction filter)
CharIterablematchesAll in interface CharIterablematchesAll in class CharOpenCustomHashSetfilter - that should be appliedpublic char reduce(char identity,
CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterablereduce in class CharOpenCustomHashSetidentity - the start valueoperator - the operation that should be appliedpublic char reduce(CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterablereduce in class CharOpenCustomHashSetoperator - the operation that should be appliedpublic char findFirst(Char2BooleanFunction filter)
CharIterablefindFirst in interface CharIterablefindFirst in class CharOpenCustomHashSetfilter - that should be appliedpublic int count(Char2BooleanFunction filter)
CharIterablecount in interface CharIterablecount in class CharOpenCustomHashSetfilter - that should be appliedpublic 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 CharOpenCustomHashSetCollection.iterator()public CharBidirectionalIterator iterator(char fromElement)
CharOrderedSetiterator in interface CharOrderedSetfromElement - the element the iterator should start frompublic CharLinkedOpenCustomHashSet copy()
CharCollectioncopy in interface CharCollectioncopy in interface CharOrderedSetcopy in interface CharSetcopy in class CharOpenCustomHashSet