Class ImmutableLongMapKeySet
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractLongIterable
org.eclipse.collections.impl.set.primitive.AbstractLongSet
org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableLongSet
org.eclipse.collections.impl.map.mutable.primitive.ImmutableLongMapKeySet
- All Implemented Interfaces:
Serializable, ImmutableLongCollection, LongIterable, PrimitiveIterable, ImmutableLongSet, LongSet
This file was automatically generated from template file immutablePrimitiveMapKeySet.stg
- Since:
- 6.0.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final booleanprivate final booleanprivate static final longprivate static final intprivate static final intprivate final long[]private final intprivate static final longprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionImmutableLongMapKeySet(long[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(LongPredicate predicate) Returns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(LongPredicate predicate) Returns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false.voidappendString(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.<V> ImmutableSet<V> collect(LongToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.booleancontains(long value) Returns true if the value is contained in the LongIterable, and false if it is not.intcount(LongPredicate predicate) Returns a count of the number of elements in the LongIterable that return true for the specified predicate.longdetectIfNone(LongPredicate predicate, long ifNone) voideach(LongProcedure procedure) A synonym for forEach.voidforEach(LongProcedure procedure) Applies the LongProcedure to each element in the LongIterable.inthashCode()Follows the same general contract asSet.hashCode().<T> TinjectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) private static booleanisEmptyKey(long key) private static booleanisNonSentinel(long key) private static booleanisRemovedKey(long key) Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.private intmask(int spread) longmax()longmin()booleannoneSatisfy(LongPredicate predicate) Returns true if none of the elements in the LongIterable return true for the specified predicate, otherwise returns false.(package private) intprobe(long element) (package private) intprobeThree(long element, int removedIndex) (package private) intprobeTwo(long element, int removedIndex) reject(LongPredicate predicate) Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.select(LongPredicate predicate) Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.intsize()Returns the number of items in this iterable.(package private) intspreadAndMask(long element) (package private) intspreadTwoAndMask(long element) longsum()long[]toArray()Converts the LongIterable to a primitive long array.long[]toArray(long[] array) Converts the LongIterable to a primitive long array.private ObjectMethods inherited from class AbstractImmutableLongSet
chunk, freeze, newWith, newWithAll, newWithout, newWithoutAll, toImmutableMethods inherited from class AbstractLongSet
cartesianProduct, equalsMethods inherited from class AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface ImmutableLongSet
difference, intersect, symmetricDifference, tap, unionMethods inherited from interface LongIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface LongSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tapMethods inherited from interface PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EMPTY_KEY
private static final long EMPTY_KEY- See Also:
-
REMOVED_KEY
private static final long REMOVED_KEY- See Also:
-
CACHE_LINE_SIZE
private static final int CACHE_LINE_SIZE- See Also:
-
KEY_SIZE
private static final int KEY_SIZE- See Also:
-
INITIAL_LINEAR_PROBE
private static final int INITIAL_LINEAR_PROBE- See Also:
-
keys
private final long[] keys -
occupiedWithData
private final int occupiedWithData -
containsZeroKey
private final boolean containsZeroKey -
containsOneKey
private final boolean containsOneKey
-
-
Constructor Details
-
ImmutableLongMapKeySet
ImmutableLongMapKeySet(long[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
-
Method Details
-
isEmptyKey
private static boolean isEmptyKey(long key) -
isRemovedKey
private static boolean isRemovedKey(long key) -
isNonSentinel
private static boolean isNonSentinel(long key) -
hashCode
public int hashCode()Description copied from interface:LongSetFollows the same general contract asSet.hashCode().- Specified by:
hashCodein interfaceLongSet- Specified by:
hashCodein classAbstractLongSet
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
longIterator
Description copied from interface:LongIterableReturns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.- Specified by:
longIteratorin interfaceLongIterable
-
toArray
public long[] toArray()Description copied from interface:LongIterableConverts the LongIterable to a primitive long array.- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] array) Description copied from interface:LongIterableConverts the LongIterable to a primitive long array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value) Description copied from interface:LongIterableReturns true if the value is contained in the LongIterable, and false if it is not.- Specified by:
containsin interfaceLongIterable
-
forEach
Description copied from interface:LongIterableApplies the LongProcedure to each element in the LongIterable.- Specified by:
forEachin interfaceLongIterable
-
each
Description copied from interface:LongIterableA synonym for forEach.- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
select
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.- Specified by:
selectin interfaceImmutableLongCollection- Specified by:
selectin interfaceImmutableLongSet- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongSet
-
reject
Description copied from interface:LongIterableReturns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.- Specified by:
rejectin interfaceImmutableLongCollection- Specified by:
rejectin interfaceImmutableLongSet- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongSet
-
collect
Description copied from interface:LongIterableReturns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collectin interfaceImmutableLongCollection- Specified by:
collectin interfaceImmutableLongSet- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongSet
-
detectIfNone
- Specified by:
detectIfNonein interfaceLongIterable
-
count
Description copied from interface:LongIterableReturns a count of the number of elements in the LongIterable that return true for the specified predicate.- Specified by:
countin interfaceLongIterable
-
anySatisfy
Description copied from interface:LongIterableReturns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
Description copied from interface:LongIterableReturns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
Description copied from interface:LongIterableReturns true if none of the elements in the LongIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceLongIterable
-
sum
public long sum()- Specified by:
sumin interfaceLongIterable
-
max
public long max()- Specified by:
maxin interfaceLongIterable
-
min
public long min()- Specified by:
minin interfaceLongIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceLongIterable
-
writeReplace
-
probe
int probe(long element) -
probeTwo
int probeTwo(long element, int removedIndex) -
probeThree
int probeThree(long element, int removedIndex) -
spreadAndMask
int spreadAndMask(long element) -
spreadTwoAndMask
int spreadTwoAndMask(long element) -
mask
private int mask(int spread)
-