Class ImmutableByteMapKeySet
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractByteIterable
-
- org.eclipse.collections.impl.set.primitive.AbstractByteSet
-
- org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableByteSet
-
- org.eclipse.collections.impl.map.mutable.primitive.ImmutableByteMapKeySet
-
- All Implemented Interfaces:
java.io.Serializable,ByteIterable,ImmutableByteCollection,PrimitiveIterable,ByteSet,ImmutableByteSet
class ImmutableByteMapKeySet extends AbstractImmutableByteSet implements java.io.Serializable
This file was automatically generated from template file immutablePrimitiveMapKeySet.stg- Since:
- 6.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classImmutableByteMapKeySet.InternalByteIterator
-
Field Summary
Fields Modifier and Type Field Description private static intCACHE_LINE_SIZEprivate booleancontainsOneKeyprivate booleancontainsZeroKeyprivate static byteEMPTY_KEYprivate static intINITIAL_LINEAR_PROBEprivate static intKEY_SIZEprivate byte[]keysprivate intoccupiedWithDataprivate static byteREMOVED_KEYprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableByteMapKeySet(byte[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(BytePredicate predicate)Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(BytePredicate predicate)Returns true if any of the elements in the ByteIterable 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.ByteIteratorbyteIterator()Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style.<V> ImmutableSet<V>collect(ByteToObjectFunction<? extends V> function)Returns a new collection with the results of applying the specified function on each element of the source collection.booleancontains(byte value)Returns true if the value is contained in the ByteIterable, and false if it is not.intcount(BytePredicate predicate)Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.bytedetectIfNone(BytePredicate predicate, byte ifNone)voideach(ByteProcedure procedure)A synonym for forEach.voidforEach(ByteProcedure procedure)Applies the ByteProcedure to each element in the ByteIterable.inthashCode()Follows the same general contract asSet.hashCode().<T> TinjectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)private static booleanisEmptyKey(byte key)private static booleanisNonSentinel(byte key)private static booleanisRemovedKey(byte key)private intmask(int spread)bytemax()bytemin()booleannoneSatisfy(BytePredicate predicate)Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.(package private) intprobe(byte element)ImmutableByteSetreject(BytePredicate predicate)Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.ImmutableByteSetselect(BytePredicate predicate)Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.intsize()Returns the number of items in this iterable.(package private) intspreadAndMask(byte element)longsum()byte[]toArray()Converts the ByteIterable to a primitive byte array.byte[]toArray(byte[] array)Converts the ByteIterable to a primitive byte array.private java.lang.ObjectwriteReplace()-
Methods inherited from class org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableByteSet
chunk, freeze, newWith, newWithAll, newWithout, newWithoutAll, toImmutable
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractByteSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractByteIterable
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.ByteIterable
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.ByteSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.ImmutableByteSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EMPTY_KEY
private static final byte EMPTY_KEY
- See Also:
- Constant Field Values
-
REMOVED_KEY
private static final byte 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
-
keys
private final byte[] keys
-
occupiedWithData
private final int occupiedWithData
-
containsZeroKey
private final boolean containsZeroKey
-
containsOneKey
private final boolean containsOneKey
-
-
Method Detail
-
isEmptyKey
private static boolean isEmptyKey(byte key)
-
isRemovedKey
private static boolean isRemovedKey(byte key)
-
isNonSentinel
private static boolean isNonSentinel(byte key)
-
hashCode
public int hashCode()
Description copied from interface:ByteSetFollows the same general contract asSet.hashCode().- Specified by:
hashCodein interfaceByteSet- Specified by:
hashCodein classAbstractByteSet
-
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
-
byteIterator
public ByteIterator byteIterator()
Description copied from interface:ByteIterableReturns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style.- Specified by:
byteIteratorin interfaceByteIterable
-
toArray
public byte[] toArray()
Description copied from interface:ByteIterableConverts the ByteIterable to a primitive byte array.- Specified by:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] array)
Description copied from interface:ByteIterableConverts the ByteIterable to a primitive byte 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 interfaceByteIterable
-
contains
public boolean contains(byte value)
Description copied from interface:ByteIterableReturns true if the value is contained in the ByteIterable, and false if it is not.- Specified by:
containsin interfaceByteIterable
-
forEach
public void forEach(ByteProcedure procedure)
Description copied from interface:ByteIterableApplies the ByteProcedure to each element in the ByteIterable.- Specified by:
forEachin interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
Description copied from interface:ByteIterableA synonym for forEach.- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
select
public ImmutableByteSet select(BytePredicate predicate)
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteSet- Specified by:
selectin interfaceImmutableByteCollection- Specified by:
selectin interfaceImmutableByteSet
-
reject
public ImmutableByteSet reject(BytePredicate predicate)
Description copied from interface:ByteIterableReturns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteSet- Specified by:
rejectin interfaceImmutableByteCollection- Specified by:
rejectin interfaceImmutableByteSet
-
collect
public <V> ImmutableSet<V> collect(ByteToObjectFunction<? extends V> function)
Description copied from interface:ByteIterableReturns 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 interfaceByteIterable- Specified by:
collectin interfaceByteSet- Specified by:
collectin interfaceImmutableByteCollection- Specified by:
collectin interfaceImmutableByteSet
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNonein interfaceByteIterable
-
count
public int count(BytePredicate predicate)
Description copied from interface:ByteIterableReturns a count of the number of elements in the ByteIterable that return true for the specified predicate.- Specified by:
countin interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
Description copied from interface:ByteIterableReturns true if any of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
Description copied from interface:ByteIterableReturns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
Description copied from interface:ByteIterableReturns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceByteIterable
-
sum
public long sum()
- Specified by:
sumin interfaceByteIterable
-
max
public byte max()
- Specified by:
maxin interfaceByteIterable
-
min
public byte min()
- Specified by:
minin interfaceByteIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceByteIterable
-
writeReplace
private java.lang.Object writeReplace()
-
probe
int probe(byte element)
-
spreadAndMask
int spreadAndMask(byte element)
-
mask
private int mask(int spread)
-
-