public class IntOpenHashSet extends AbstractIntSet implements ITrimmable
| Constructor and Description |
|---|
IntOpenHashSet()
Default Constructor
|
IntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection)
Deprecated.
|
IntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection,
float loadFactor)
Deprecated.
|
IntOpenHashSet(int minCapacity)
Constructor that defines the minimum capacity
|
IntOpenHashSet(int[] array)
Helper constructor that allow to create a set from unboxed values
|
IntOpenHashSet(int[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
IntOpenHashSet(int[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
IntOpenHashSet(int[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
IntOpenHashSet(IntCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntOpenHashSet(IntCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
IntOpenHashSet(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
IntOpenHashSet(IntIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenHashSet(IntIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenHashSet(java.util.Iterator<java.lang.Integer> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
IntOpenHashSet(java.util.Iterator<java.lang.Integer> 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 |
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.
|
boolean |
contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
IntIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
remove(int o)
A Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
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, containsAll, containsAny, containsAny, remInt, removeAll, retainAll, toIntArray, toIntArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclearAndTrim, trimadd, remInt, spliteratorcontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, containsAny, containsAny, parallelPrimitiveStream, primitiveStream, remIf, removeAll, removeIf, retainAll, toIntArray, toIntArrayforEach, forEachpublic IntOpenHashSet()
public IntOpenHashSet(int minCapacity)
minCapacity - the minimum capacity the HashSet is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic IntOpenHashSet(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 IntOpenHashSet(int[] array)
array - the elements that should be put into the setpublic IntOpenHashSet(int[] 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 IntOpenHashSet(int[] 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 IntOpenHashSet(int[] 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 IntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection)
collection - the set the elements should be added to the Set@Deprecated
public IntOpenHashSet(java.util.Collection<? extends java.lang.Integer> 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 IntOpenHashSet(IntCollection collection)
collection - the set the elements should be added to the Setpublic IntOpenHashSet(IntCollection 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 IntOpenHashSet(java.util.Iterator<java.lang.Integer> iterator)
iterator - the elements that should be added to the setpublic IntOpenHashSet(java.util.Iterator<java.lang.Integer> 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 IntOpenHashSet(IntIterator iterator)
iterator - the elements that should be added to the setpublic IntOpenHashSet(IntIterator 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 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(java.lang.Object o)
AbstractIntCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Integer>contains in interface java.util.Set<java.lang.Integer>contains in interface IntCollectioncontains in interface IntSetcontains in class AbstractIntCollectionpublic boolean remove(java.lang.Object o)
AbstractIntCollectionThis default implementation delegates to the corresponding type-specific function.
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Integer>remove in interface java.util.Set<java.lang.Integer>remove in interface IntCollectionremove in interface IntSetremove in class AbstractIntCollectionpublic 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>