Class ImmutableShortShortMapKeySet
- 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.ImmutableShortShortMapKeySet
-
- All Implemented Interfaces:
java.io.Serializable,ImmutableShortCollection,PrimitiveIterable,ImmutableShortSet,ShortSet,ShortIterable
class ImmutableShortShortMapKeySet extends AbstractImmutableShortSet implements java.io.Serializable
This file was automatically generated from template file immutablePrimitivePrimitiveMapKeySet.stg- Since:
- 6.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classImmutableShortShortMapKeySet.InternalShortIterator
-
Field Summary
Fields Modifier and Type Field Description private static intCACHE_LINE_SIZEprivate booleancontainsOneKeyprivate booleancontainsZeroKeyprivate static shortEMPTY_KEYprivate static intINITIAL_LINEAR_PROBEprivate static intKEY_SIZEprivate short[]keysValuesprivate intoccupiedWithDataprivate static shortREMOVED_KEYprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableShortShortMapKeySet(short[] keysValues, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(ShortPredicate predicate)Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(ShortPredicate predicate)Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.voidappendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.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.booleancontains(short value)Returns true if the value is contained in the ShortIterable, and false if it is not.intcount(ShortPredicate predicate)Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.shortdetectIfNone(ShortPredicate predicate, short ifNone)voideach(ShortProcedure procedure)A synonym for forEach.voidforEach(ShortProcedure procedure)Applies the ShortProcedure to each element in the ShortIterable.inthashCode()Follows the same general contract asSet.hashCode().<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)private static booleanisEmptyKey(short key)private static booleanisNonSentinel(short key)private static booleanisRemovedKey(short key)private intmask(int spread)shortmax()shortmin()booleannoneSatisfy(ShortPredicate predicate)Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.(package private) intprobe(short element)(package private) intprobeThree(short element, int removedIndex)(package private) intprobeTwo(short element, int removedIndex)ImmutableShortSetreject(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.ImmutableShortSetselect(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.ShortIteratorshortIterator()Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.intsize()Returns the number of items in this iterable.(package private) intspreadAndMask(short element)(package private) intspreadTwoAndMask(short element)longsum()short[]toArray()Converts the ShortIterable to a primitive short array.short[]toArray(short[] array)Converts the ShortIterable to a primitive short array.private java.lang.ObjectwriteReplace()-
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 Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EMPTY_KEY
private static final short EMPTY_KEY
- See Also:
- Constant Field Values
-
REMOVED_KEY
private static final short REMOVED_KEY
- See Also:
- Constant Field Values
-
CACHE_LINE_SIZE
private static final int CACHE_LINE_SIZE
- See Also:
- Constant Field Values
-
KEY_SIZE
private static final int KEY_SIZE
- See Also:
- Constant Field Values
-
INITIAL_LINEAR_PROBE
private static final int INITIAL_LINEAR_PROBE
- See Also:
- Constant Field Values
-
keysValues
private final short[] keysValues
-
occupiedWithData
private final int occupiedWithData
-
containsZeroKey
private final boolean containsZeroKey
-
containsOneKey
private final boolean containsOneKey
-
-
Method Detail
-
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:ShortSetFollows the same general contract asSet.hashCode().- Specified by:
hashCodein interfaceShortSet- Specified by:
hashCodein classAbstractShortSet
-
size
public int size()
Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)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
-
shortIterator
public ShortIterator shortIterator()
Description copied from interface:ShortIterableReturns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.- Specified by:
shortIteratorin interfaceShortIterable
-
toArray
public short[] toArray()
Description copied from interface:ShortIterableConverts the ShortIterable to a primitive short array.- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] array)
Description copied from interface:ShortIterableConverts 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:
toArrayin interfaceShortIterable
-
contains
public boolean contains(short value)
Description copied from interface:ShortIterableReturns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
containsin interfaceShortIterable
-
forEach
public void forEach(ShortProcedure procedure)
Description copied from interface:ShortIterableApplies the ShortProcedure to each element in the ShortIterable.- Specified by:
forEachin interfaceShortIterable
-
each
public void each(ShortProcedure procedure)
Description copied from interface:ShortIterableA synonym for forEach.- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
select
public ImmutableShortSet select(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
selectin interfaceImmutableShortCollection- Specified by:
selectin interfaceImmutableShortSet- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortSet
-
reject
public ImmutableShortSet reject(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
rejectin interfaceImmutableShortCollection- Specified by:
rejectin interfaceImmutableShortSet- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortSet
-
collect
public <V> ImmutableSet<V> collect(ShortToObjectFunction<? extends V> function)
Description copied from interface:ShortIterableReturns 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 interfaceImmutableShortCollection- Specified by:
collectin interfaceImmutableShortSet- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortSet
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
count
public int count(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceShortIterable
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceShortIterable
-
writeReplace
private java.lang.Object 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)
-
-