Class ImmutableShortMapKeySet
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.set.primitive.AbstractShortSet
org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableShortSet
org.eclipse.collections.impl.map.mutable.primitive.ImmutableShortMapKeySet
- All Implemented Interfaces:
Serializable
,ImmutableShortCollection
,PrimitiveIterable
,ImmutableShortSet
,ShortSet
,ShortIterable
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 int
private final boolean
private final boolean
private static final short
private static final int
private static final int
private final short[]
private final int
private static final short
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableShortMapKeySet
(short[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey) -
Method Summary
Modifier and TypeMethodDescriptionboolean
allSatisfy
(ShortPredicate predicate) Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy
(ShortPredicate predicate) Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.void
appendString
(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable
.<V> ImmutableSet
<V> collect
(ShortToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains
(short value) Returns true if the value is contained in the ShortIterable, and false if it is not.int
count
(ShortPredicate predicate) Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.short
detectIfNone
(ShortPredicate predicate, short ifNone) void
each
(ShortProcedure procedure) A synonym for forEach.void
forEach
(ShortProcedure procedure) Applies the ShortProcedure to each element in the ShortIterable.int
hashCode()
Follows the same general contract asSet.hashCode()
.<T> T
injectInto
(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) private static boolean
isEmptyKey
(short key) private static boolean
isNonSentinel
(short key) private static boolean
isRemovedKey
(short key) private int
mask
(int spread) short
max()
short
min()
boolean
noneSatisfy
(ShortPredicate predicate) Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.(package private) int
probe
(short element) (package private) int
probeThree
(short element, int removedIndex) (package private) int
probeTwo
(short element, int removedIndex) reject
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.select
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.int
size()
Returns the number of items in this iterable.(package private) int
spreadAndMask
(short element) (package private) int
spreadTwoAndMask
(short element) long
sum()
short[]
toArray()
Converts the ShortIterable to a primitive short array.short[]
toArray
(short[] array) Converts the ShortIterable to a primitive short array.private Object
Methods inherited from class org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableShortSet
chunk, freeze, newWith, newWithAll, newWithout, newWithoutAll, toImmutable
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractShortSet
cartesianProduct, equals
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.set.primitive.ImmutableShortSet
difference, intersect, symmetricDifference, tap, union
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
Methods inherited from interface org.eclipse.collections.api.ShortIterable
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, toSortedListBy
Methods inherited from interface org.eclipse.collections.api.set.primitive.ShortSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EMPTY_KEY
private static final short EMPTY_KEY- See Also:
-
REMOVED_KEY
private static final short 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 short[] keys -
occupiedWithData
private final int occupiedWithData -
containsZeroKey
private final boolean containsZeroKey -
containsOneKey
private final boolean containsOneKey
-
-
Constructor Details
-
ImmutableShortMapKeySet
ImmutableShortMapKeySet(short[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
-
Method Details
-
isEmptyKey
private static boolean isEmptyKey(short key) -
isRemovedKey
private static boolean isRemovedKey(short key) -
isNonSentinel
private static boolean isNonSentinel(short key) -
hashCode
public int hashCode()Description copied from interface:ShortSet
Follows the same general contract asSet.hashCode()
.- Specified by:
hashCode
in interfaceShortSet
- Specified by:
hashCode
in classAbstractShortSet
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
-
shortIterator
Description copied from interface:ShortIterable
Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.- Specified by:
shortIterator
in interfaceShortIterable
-
toArray
public short[] toArray()Description copied from interface:ShortIterable
Converts the ShortIterable to a primitive short array.- Specified by:
toArray
in interfaceShortIterable
-
toArray
public short[] toArray(short[] array) Description copied from interface:ShortIterable
Converts the ShortIterable to a primitive short 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:
toArray
in interfaceShortIterable
-
contains
public boolean contains(short value) Description copied from interface:ShortIterable
Returns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
contains
in interfaceShortIterable
-
forEach
Description copied from interface:ShortIterable
Applies the ShortProcedure to each element in the ShortIterable.- Specified by:
forEach
in interfaceShortIterable
-
each
Description copied from interface:ShortIterable
A synonym for forEach.- Specified by:
each
in interfaceShortIterable
- Since:
- 7.0.
-
select
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
select
in interfaceImmutableShortCollection
- Specified by:
select
in interfaceImmutableShortSet
- Specified by:
select
in interfaceShortIterable
- Specified by:
select
in interfaceShortSet
-
reject
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
reject
in interfaceImmutableShortCollection
- Specified by:
reject
in interfaceImmutableShortSet
- Specified by:
reject
in interfaceShortIterable
- Specified by:
reject
in interfaceShortSet
-
collect
Description copied from interface:ShortIterable
Returns 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:
collect
in interfaceImmutableShortCollection
- Specified by:
collect
in interfaceImmutableShortSet
- Specified by:
collect
in interfaceShortIterable
- Specified by:
collect
in interfaceShortSet
-
detectIfNone
- Specified by:
detectIfNone
in interfaceShortIterable
-
count
Description copied from interface:ShortIterable
Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
count
in interfaceShortIterable
-
anySatisfy
Description copied from interface:ShortIterable
Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceShortIterable
-
allSatisfy
Description copied from interface:ShortIterable
Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceShortIterable
-
noneSatisfy
Description copied from interface:ShortIterable
Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceShortIterable
-
sum
public long sum()- Specified by:
sum
in interfaceShortIterable
-
max
public short max()- Specified by:
max
in interfaceShortIterable
-
min
public short min()- Specified by:
min
in interfaceShortIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) - Specified by:
injectInto
in interfaceShortIterable
-
writeReplace
-
probe
int probe(short element) -
probeTwo
int probeTwo(short element, int removedIndex) -
probeThree
int probeThree(short element, int removedIndex) -
spreadAndMask
int spreadAndMask(short element) -
spreadTwoAndMask
int spreadTwoAndMask(short element) -
mask
private int mask(int spread)
-