public class CharOpenCustomHashSet extends AbstractCharSet implements ITrimmable
ISizeProvider.CollectionSize| Constructor and Description |
|---|
CharOpenCustomHashSet(char[] array,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharOpenCustomHashSet(char[] array,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharOpenCustomHashSet(char[] array,
int offset,
int length,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharOpenCustomHashSet(char[] array,
int offset,
int length,
float loadFactor,
CharStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
CharOpenCustomHashSet(CharCollection collection,
CharStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharOpenCustomHashSet(CharCollection collection,
float loadFactor,
CharStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
CharOpenCustomHashSet(CharIterator iterator,
CharStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharOpenCustomHashSet(CharIterator iterator,
float loadFactor,
CharStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
CharOpenCustomHashSet(CharStrategy strategy)
Default Contstructor
|
CharOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
CharStrategy strategy)
Deprecated.
|
CharOpenCustomHashSet(java.util.Collection<? extends java.lang.Character> collection,
float loadFactor,
CharStrategy strategy)
Deprecated.
|
CharOpenCustomHashSet(int minCapacity,
CharStrategy strategy)
Constructor that defines the minimum capacity
|
CharOpenCustomHashSet(int minCapacity,
float loadFactor,
CharStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
CharOpenCustomHashSet(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
|
CharOpenCustomHashSet(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 |
add(char o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(CharCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Character> c)
Deprecated.
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(char o)
A Type-Specific implementation of contains.
|
CharOpenCustomHashSet |
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.
|
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.
|
CharStrategy |
getStrategy()
Helper getter function to get the current strategy
|
CharIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
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.
|
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
|
boolean |
remove(char o)
A Type Specific remove function to reduce boxing/unboxing
|
int |
size() |
boolean |
trim(int size)
Trims the original collection down to the size of the current elements or the requested size depending which is bigger
|
equals, hashCodeadd, contains, containsAll, containsAll, containsAny, containsAny, remChar, remove, removeAll, removeAll, retainAll, retainAll, toCharArray, toCharArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remChar, remove, spliterator, synchronize, synchronize, unmodifiablecontainsAll, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, 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, sortedofpublic CharOpenCustomHashSet(CharStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharOpenCustomHashSet(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 CharStrategy getStrategy()
public boolean add(char o)
CharCollectionadd in interface CharCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Character> c)
AbstractCharCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Character>addAll in interface java.util.Set<java.lang.Character>addAll in class AbstractCharCollectionpublic boolean addAll(CharCollection c)
CharCollectionaddAll in interface CharCollectionaddAll in class AbstractCharCollectionc - the collection of elements that should be addedpublic boolean contains(char o)
AbstractCharCollectioncontains in interface CharCollectioncontains in class AbstractCharCollectiono - the element that should be searched for.public boolean remove(char o)
CharSetpublic boolean trim(int size)
ITrimmabletrim in interface ITrimmablesize - the requested trim size.public void clearAndTrim(int size)
ITrimmableclearAndTrim in interface ITrimmablesize - the amount of elements that should be allowedpublic CharIterator 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 CharSetiterator in class AbstractCharSetCollection.iterator()public CharOpenCustomHashSet copy()
CharCollectioncopy in interface CharCollectioncopy in interface CharSetcopy in class AbstractCharSetpublic void clear()
clear in interface java.util.Collection<java.lang.Character>clear in interface java.util.Set<java.lang.Character>clear in class java.util.AbstractCollection<java.lang.Character>public int size()
size in interface java.util.Collection<java.lang.Character>size in interface java.util.Set<java.lang.Character>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Character>public void forEach(CharConsumer action)
CharIterableforEach in interface CharIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntCharConsumer action)
CharIterableforEachIndexed in interface CharIterableaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectCharConsumer<E> action)
CharIterableforEach in interface CharIterableE - 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 CharIterablefilter - that should be appliedpublic boolean matchesNone(CharPredicate filter)
CharIterablematchesNone in interface CharIterablefilter - that should be appliedpublic boolean matchesAll(CharPredicate filter)
CharIterablematchesAll in interface CharIterablefilter - that should be appliedpublic char reduce(char identity,
CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterableidentity - the start valueoperator - the operation that should be appliedpublic char reduce(CharCharUnaryOperator operator)
CharIterablereduce in interface CharIterableoperator - the operation that should be appliedpublic char findFirst(CharPredicate filter)
CharIterablefindFirst in interface CharIterablefilter - that should be appliedpublic int count(CharPredicate filter)
CharIterablecount in interface CharIterablefilter - that should be applied