public class ImmutableIntOpenHashSet extends AbstractIntSet implements IntOrderedSet
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ImmutableIntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection)
Deprecated.
|
ImmutableIntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection,
float loadFactor)
Deprecated.
|
ImmutableIntOpenHashSet(int[] array)
Helper constructor that allow to create a set from unboxed values
|
ImmutableIntOpenHashSet(int[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableIntOpenHashSet(int[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ImmutableIntOpenHashSet(int[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableIntOpenHashSet(IntCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableIntOpenHashSet(IntCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableIntOpenHashSet(IntIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableIntOpenHashSet(IntIterator iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableIntOpenHashSet(java.util.Iterator<java.lang.Integer> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableIntOpenHashSet(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
|
boolean |
addAndMoveToFirst(int o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(int o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
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.
|
ImmutableIntOpenHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
int |
findFirst(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
int |
firstInt()
A method to get the first element in the set
|
<E> void |
forEach(E input,
ObjectIntConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(IntConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
void |
forEachIndexed(IntIntConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
IntListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
IntBidirectionalIterator |
iterator(int fromElement)
A type Specific Iterator starting from a given key
|
int |
lastInt()
A method to get the last element in the set
|
boolean |
matchesAll(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(int o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(int o)
A specific move method to move a given key to the last index.
|
int |
pollFirstInt()
A method to get and remove the first element in the set
|
int |
pollLastInt()
A method to get and remove the last element in the set
|
int |
reduce(int identity,
IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
int |
reduce(IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
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() |
equals, hashCodeadd, containsAll, containsAll, containsAny, containsAny, remInt, removeAll, removeAll, retainAll, retainAll, toIntArray, toIntArrayisEmpty, removeAll, retainAll, toArray, toArray, toStringspliterator, synchronize, synchronize, unmodifiablecontainsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArrayaddAll, addAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, primitiveStream, remIf, removeAll, removeAll, removeIf, retainAll, retainAll, toIntArray, toIntArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic ImmutableIntOpenHashSet(int[] array)
array - the elements that should be put into the setpublic ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(java.util.Collection<? extends java.lang.Integer> collection)
collection - the set the elements should be added to the Set@Deprecated
public ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(IntCollection collection)
collection - the set the elements should be added to the Setpublic ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(java.util.Iterator<java.lang.Integer> iterator)
iterator - the elements that should be added to the setpublic ImmutableIntOpenHashSet(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 ImmutableIntOpenHashSet(IntIterator iterator)
iterator - the elements that should be added to the setpublic ImmutableIntOpenHashSet(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 addAndMoveToFirst(int o)
IntOrderedSetaddAndMoveToFirst in interface IntOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(int o)
IntOrderedSetaddAndMoveToLast in interface IntOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(int o)
IntOrderedSetmoveToFirst in interface IntOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(int o)
IntOrderedSetmoveToLast in interface IntOrderedSeto - that should be moved to the first lastpublic 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 int firstInt()
IntOrderedSetfirstInt in interface IntOrderedSetpublic int pollFirstInt()
IntOrderedSetpollFirstInt in interface IntOrderedSetpublic int lastInt()
IntOrderedSetlastInt in interface IntOrderedSetpublic int pollLastInt()
IntOrderedSetpollLastInt in interface IntOrderedSetpublic 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 void forEach(IntConsumer action)
IntIterableforEach in interface IntIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public void forEachIndexed(IntIntConsumer action)
IntIterableforEachIndexed in interface IntIterableaction - The action to be performed for each elementpublic <E> void forEach(E input,
ObjectIntConsumer<E> action)
IntIterableforEach in interface IntIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.IntPredicate filter)
IntIterablematchesAny in interface IntIterablefilter - that should be appliedpublic boolean matchesNone(java.util.function.IntPredicate filter)
IntIterablematchesNone in interface IntIterablefilter - that should be appliedpublic boolean matchesAll(java.util.function.IntPredicate filter)
IntIterablematchesAll in interface IntIterablefilter - that should be appliedpublic int reduce(int identity,
IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableidentity - the start valueoperator - the operation that should be appliedpublic int reduce(IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableoperator - the operation that should be appliedpublic int findFirst(java.util.function.IntPredicate filter)
IntIterablefindFirst in interface IntIterablefilter - that should be appliedpublic int count(java.util.function.IntPredicate filter)
IntIterablecount in interface IntIterablefilter - that should be appliedpublic IntListIterator 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 IntOrderedSetiterator in interface IntSetiterator in class AbstractIntSetCollection.iterator()public IntBidirectionalIterator iterator(int fromElement)
IntOrderedSetiterator in interface IntOrderedSetfromElement - the element the iterator should start frompublic ImmutableIntOpenHashSet copy()
IntCollectioncopy in interface IntCollectioncopy in interface IntOrderedSetcopy in interface IntSetcopy in class AbstractIntSetpublic 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 interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Integer>