public class ImmutableLongOpenHashSet extends AbstractLongSet implements LongOrderedSet
| Constructor and Description |
|---|
ImmutableLongOpenHashSet(java.util.Collection<? extends java.lang.Long> collection)
Deprecated.
|
ImmutableLongOpenHashSet(java.util.Collection<? extends java.lang.Long> collection,
float loadFactor)
Deprecated.
|
ImmutableLongOpenHashSet(java.util.Iterator<java.lang.Long> iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableLongOpenHashSet(java.util.Iterator<java.lang.Long> iterator,
float loadFactor)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableLongOpenHashSet(long[] array)
Helper constructor that allow to create a set from unboxed values
|
ImmutableLongOpenHashSet(long[] array,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableLongOpenHashSet(long[] array,
int offset,
int length)
Helper constructor that allow to create a set from unboxed values
|
ImmutableLongOpenHashSet(long[] array,
int offset,
int length,
float loadFactor)
Helper constructor that allow to create a set from unboxed values
|
ImmutableLongOpenHashSet(LongCollection collection)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableLongOpenHashSet(LongCollection collection,
float loadFactor)
A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
|
ImmutableLongOpenHashSet(LongIterator iterator)
A Helper constructor that allows to create a set from a iterator of an unknown size
|
ImmutableLongOpenHashSet(LongIterator 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(long o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Long> c)
Deprecated.
|
boolean |
addAll(LongCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAndMoveToFirst(long o)
A customized add method that allows you to insert into the first index.
|
boolean |
addAndMoveToLast(long o)
A customized add method that allows you to insert into the last index.
|
void |
clear() |
boolean |
contains(long o)
A Type-Specific implementation of contains.
|
boolean |
contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
|
ImmutableLongOpenHashSet |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
long |
findFirst(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
long |
firstLong()
A method to get the first element in the set
|
<E> void |
forEach(E input,
ObjectLongConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(LongConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
LongListIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
LongBidirectionalIterator |
iterator(long fromElement)
A type Specific Iterator starting from a given key
|
long |
lastLong()
A method to get the last element in the set
|
boolean |
matchesAll(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
boolean |
moveToFirst(long o)
A specific move method to move a given key to the first index.
|
boolean |
moveToLast(long o)
A specific move method to move a given key to the last index.
|
long |
pollFirstLong()
A method to get and remove the first element in the set
|
long |
pollLastLong()
A method to get and remove the last element in the set
|
long |
reduce(long identity,
LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
long |
reduce(LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(long 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, remLong, removeAll, removeAll, retainAll, retainAll, toLongArray, toLongArrayisEmpty, 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, toLongArray, toLongArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, sortedpublic ImmutableLongOpenHashSet(long[] array)
array - the elements that should be put into the setpublic ImmutableLongOpenHashSet(long[] 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 ImmutableLongOpenHashSet(long[] 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 ImmutableLongOpenHashSet(long[] 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 ImmutableLongOpenHashSet(java.util.Collection<? extends java.lang.Long> collection)
collection - the set the elements should be added to the Set@Deprecated
public ImmutableLongOpenHashSet(java.util.Collection<? extends java.lang.Long> 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 ImmutableLongOpenHashSet(LongCollection collection)
collection - the set the elements should be added to the Setpublic ImmutableLongOpenHashSet(LongCollection 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 ImmutableLongOpenHashSet(java.util.Iterator<java.lang.Long> iterator)
iterator - the elements that should be added to the setpublic ImmutableLongOpenHashSet(java.util.Iterator<java.lang.Long> 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 ImmutableLongOpenHashSet(LongIterator iterator)
iterator - the elements that should be added to the setpublic ImmutableLongOpenHashSet(LongIterator 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(long o)
LongCollectionadd in interface LongCollectiono - the element that should be added@Deprecated public boolean addAll(java.util.Collection<? extends java.lang.Long> c)
AbstractLongCollectionThis default implementation delegates to the corresponding type-specific function.
addAll in interface java.util.Collection<java.lang.Long>addAll in interface java.util.Set<java.lang.Long>addAll in class AbstractLongCollectionpublic boolean addAll(LongCollection c)
LongCollectionaddAll in interface LongCollectionaddAll in class AbstractLongCollectionc - the collection of elements that should be addedpublic boolean addAndMoveToFirst(long o)
LongOrderedSetaddAndMoveToFirst in interface LongOrderedSeto - the element that should be insertedSet.add(Object)public boolean addAndMoveToLast(long o)
LongOrderedSetaddAndMoveToLast in interface LongOrderedSeto - the element that should be insertedSet.add(Object)public boolean moveToFirst(long o)
LongOrderedSetmoveToFirst in interface LongOrderedSeto - that should be moved to the first indexpublic boolean moveToLast(long o)
LongOrderedSetmoveToLast in interface LongOrderedSeto - that should be moved to the first lastpublic boolean contains(java.lang.Object o)
AbstractLongCollectionThis 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.Long>contains in interface java.util.Set<java.lang.Long>contains in interface LongCollectioncontains in interface LongSetcontains in class AbstractLongCollectionpublic long firstLong()
LongOrderedSetfirstLong in interface LongOrderedSetpublic long pollFirstLong()
LongOrderedSetpollFirstLong in interface LongOrderedSetpublic long lastLong()
LongOrderedSetlastLong in interface LongOrderedSetpublic long pollLastLong()
LongOrderedSetpollLastLong in interface LongOrderedSetpublic boolean remove(java.lang.Object o)
AbstractLongCollectionThis 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.Long>remove in interface java.util.Set<java.lang.Long>remove in interface LongCollectionremove in interface LongSetremove in class AbstractLongCollectionpublic boolean contains(long o)
AbstractLongCollectioncontains in interface LongCollectioncontains in class AbstractLongCollectiono - the element that should be searched for.public boolean remove(long o)
LongSetpublic void forEach(LongConsumer action)
LongIterableforEach in interface LongIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectLongConsumer<E> action)
LongIterableforEach in interface LongIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Long2BooleanFunction filter)
LongIterablematchesAny in interface LongIterablefilter - that should be appliedpublic boolean matchesNone(Long2BooleanFunction filter)
LongIterablematchesNone in interface LongIterablefilter - that should be appliedpublic boolean matchesAll(Long2BooleanFunction filter)
LongIterablematchesAll in interface LongIterablefilter - that should be appliedpublic long reduce(long identity,
LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableidentity - the start valueoperator - the operation that should be appliedpublic long reduce(LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableoperator - the operation that should be appliedpublic long findFirst(Long2BooleanFunction filter)
LongIterablefindFirst in interface LongIterablefilter - that should be appliedpublic int count(Long2BooleanFunction filter)
LongIterablecount in interface LongIterablefilter - that should be appliedpublic LongListIterator iterator()
LongCollectioniterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.util.Set<java.lang.Long>iterator in interface LongCollectioniterator in interface LongIterableiterator in interface LongOrderedSetiterator in interface LongSetiterator in class AbstractLongSetCollection.iterator()public LongBidirectionalIterator iterator(long fromElement)
LongOrderedSetiterator in interface LongOrderedSetfromElement - the element the iterator should start frompublic ImmutableLongOpenHashSet copy()
LongCollectioncopy in interface LongCollectioncopy in interface LongOrderedSetcopy in interface LongSetcopy in class AbstractLongSetpublic void clear()
clear in interface java.util.Collection<java.lang.Long>clear in interface java.util.Set<java.lang.Long>clear in class java.util.AbstractCollection<java.lang.Long>public int size()
size in interface java.util.Collection<java.lang.Long>size in interface java.util.Set<java.lang.Long>size in class java.util.AbstractCollection<java.lang.Long>