public class IntOpenCustomHashSet extends AbstractIntSet implements ITrimmable
| Constructor and Description |
|---|
IntOpenCustomHashSet(java.util.Collection<? extends java.lang.Integer> collection,
float loadFactor,
IntStrategy strategy)
Deprecated.
|
IntOpenCustomHashSet(java.util.Collection<? extends java.lang.Integer> collection,
IntStrategy strategy)
Deprecated.
|
IntOpenCustomHashSet(int[] array,
float loadFactor,
IntStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
IntOpenCustomHashSet(int[] array,
int offset,
int length,
float loadFactor,
IntStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
IntOpenCustomHashSet(int[] array,
int offset,
int length,
IntStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
IntOpenCustomHashSet(int[] array,
IntStrategy strategy)
Helper constructor that allow to create a set from unboxed values
|
IntOpenCustomHashSet(IntCollection collection,
float loadFactor,
IntStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntOpenCustomHashSet(IntCollection collection,
IntStrategy strategy)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntOpenCustomHashSet(int minCapacity,
float loadFactor,
IntStrategy strategy)
Constructor that defines the minimum capacity and load factor
|
IntOpenCustomHashSet(int minCapacity,
IntStrategy strategy)
Constructor that defines the minimum capacity
|
IntOpenCustomHashSet(IntIterator iterator,
float loadFactor,
IntStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenCustomHashSet(IntIterator iterator,
IntStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenCustomHashSet(IntStrategy strategy)
Default Contstructor
|
IntOpenCustomHashSet(java.util.Iterator<java.lang.Integer> iterator,
float loadFactor,
IntStrategy strategy)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenCustomHashSet(java.util.Iterator<java.lang.Integer> iterator,
IntStrategy 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(int o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Integer> c)
Deprecated.
|
boolean |
addAll(IntCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
void |
clearAndTrim(int size)
Trims the collection down to the requested size and clears all elements while doing so
|
boolean |
contains(int o)
A Type-Specific implementation of contains.
|
IntStrategy |
getStrategy()
Helper getter function to get the current strategy
|
IntIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(int 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, remInt, remove, removeAll, retainAll, toIntArray, toIntArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, contains, remInt, remove, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toIntArray, toIntArrayforEach, forEachpublic IntOpenCustomHashSet(IntStrategy strategy)
strategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic IntOpenCustomHashSet(int minCapacity,
IntStrategy 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 IntOpenCustomHashSet(int minCapacity,
float loadFactor,
IntStrategy 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 IntOpenCustomHashSet(int[] array,
IntStrategy strategy)
array - the elements that should be put into the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic IntOpenCustomHashSet(int[] array,
float loadFactor,
IntStrategy 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 IntOpenCustomHashSet(int[] array,
int offset,
int length,
IntStrategy 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 IntOpenCustomHashSet(int[] array,
int offset,
int length,
float loadFactor,
IntStrategy 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 IntOpenCustomHashSet(java.util.Collection<? extends java.lang.Integer> collection,
IntStrategy 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 IntOpenCustomHashSet(java.util.Collection<? extends java.lang.Integer> collection,
float loadFactor,
IntStrategy 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 IntOpenCustomHashSet(IntCollection collection, IntStrategy 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 IntOpenCustomHashSet(IntCollection collection, float loadFactor, IntStrategy 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 IntOpenCustomHashSet(java.util.Iterator<java.lang.Integer> iterator,
IntStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic IntOpenCustomHashSet(java.util.Iterator<java.lang.Integer> iterator,
float loadFactor,
IntStrategy 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 IntOpenCustomHashSet(IntIterator iterator, IntStrategy strategy)
iterator - the elements that should be added to the setstrategy - the strategy that allows hash control.java.lang.NullPointerException - if Strategy is nullpublic IntOpenCustomHashSet(IntIterator iterator, float loadFactor, IntStrategy 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 IntStrategy getStrategy()
public boolean add(int o)
IntCollectionadd in interface IntCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
AbstractIntCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Integer>addAll in interface java.util.Set<java.lang.Integer>addAll in class AbstractIntCollectionpublic boolean addAll(IntCollection c)
IntCollectionaddAll in interface IntCollectionaddAll in class AbstractIntCollectionc - the collection of elements that should be addedpublic boolean contains(int o)
AbstractIntCollectioncontains in interface IntCollectioncontains in class AbstractIntCollectiono - the element that should be searched for.public boolean remove(int o)
IntSetpublic 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 IntIterator iterator()
IntCollectioniterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Collection<java.lang.Integer>iterator in interface java.util.Set<java.lang.Integer>iterator in interface IntCollectioniterator in interface IntIterableiterator in interface IntSetiterator in class AbstractIntSetCollection.iterator()public void clear()
clear in interface java.util.Collection<java.lang.Integer>clear in interface java.util.Set<java.lang.Integer>clear in class java.util.AbstractCollection<java.lang.Integer>public int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.Set<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>