public class CharOpenCustomHashSet extends AbstractCharSet implements ITrimmable
| 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.
|
CharStrategy |
getStrategy()
Helper getter function to get the current strategy
|
CharIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
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, containsAny, containsAny, remChar, remove, removeAll, retainAll, toCharArray, toCharArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remChar, remove, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toCharArray, toCharArrayforEach, forEachpublic 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 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 class java.util.AbstractCollection<java.lang.Character>