Class ImmutableByteByteMapKeySet
- 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.ImmutableByteByteMapKeySet
-
- All Implemented Interfaces:
java.io.Serializable
,ByteIterable
,ImmutableByteCollection
,PrimitiveIterable
,ByteSet
,ImmutableByteSet
class ImmutableByteByteMapKeySet extends AbstractImmutableByteSet 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 class
ImmutableByteByteMapKeySet.InternalByteIterator
-
Field Summary
Fields Modifier and Type Field Description private static int
CACHE_LINE_SIZE
private boolean
containsOneKey
private boolean
containsZeroKey
private static byte
EMPTY_KEY
private static int
INITIAL_LINEAR_PROBE
private static int
KEY_SIZE
private byte[]
keysValues
private int
occupiedWithData
private static byte
REMOVED_KEY
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableByteByteMapKeySet(byte[] keysValues, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(BytePredicate predicate)
Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(BytePredicate predicate)
Returns true if any of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.void
appendString(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
.ByteIterator
byteIterator()
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.boolean
contains(byte value)
Returns true if the value is contained in the ByteIterable, and false if it is not.int
count(BytePredicate predicate)
Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.byte
detectIfNone(BytePredicate predicate, byte ifNone)
void
each(ByteProcedure procedure)
A synonym for forEach.void
forEach(ByteProcedure procedure)
Applies the ByteProcedure to each element in the ByteIterable.int
hashCode()
Follows the same general contract asSet.hashCode()
.<T> T
injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
private static boolean
isEmptyKey(byte key)
private static boolean
isNonSentinel(byte key)
private static boolean
isRemovedKey(byte key)
private int
mask(int spread)
byte
max()
byte
min()
boolean
noneSatisfy(BytePredicate predicate)
Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.(package private) int
probe(byte element)
ImmutableByteSet
reject(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.ImmutableByteSet
select(BytePredicate predicate)
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.(package private) int
spreadAndMask(byte element)
long
sum()
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.Object
writeReplace()
-
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
-
keysValues
private final byte[] keysValues
-
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:ByteSet
Follows the same general contract asSet.hashCode()
.- Specified by:
hashCode
in interfaceByteSet
- Specified by:
hashCode
in classAbstractByteSet
-
size
public int size()
Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in 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: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
-
byteIterator
public ByteIterator byteIterator()
Description copied from interface:ByteIterable
Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style.- Specified by:
byteIterator
in interfaceByteIterable
-
toArray
public byte[] toArray()
Description copied from interface:ByteIterable
Converts the ByteIterable to a primitive byte array.- Specified by:
toArray
in interfaceByteIterable
-
toArray
public byte[] toArray(byte[] array)
Description copied from interface:ByteIterable
Converts 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:
toArray
in interfaceByteIterable
-
contains
public boolean contains(byte value)
Description copied from interface:ByteIterable
Returns true if the value is contained in the ByteIterable, and false if it is not.- Specified by:
contains
in interfaceByteIterable
-
forEach
public void forEach(ByteProcedure procedure)
Description copied from interface:ByteIterable
Applies the ByteProcedure to each element in the ByteIterable.- Specified by:
forEach
in interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
Description copied from interface:ByteIterable
A synonym for forEach.- Specified by:
each
in interfaceByteIterable
- Since:
- 7.0.
-
select
public ImmutableByteSet select(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceByteSet
- Specified by:
select
in interfaceImmutableByteCollection
- Specified by:
select
in interfaceImmutableByteSet
-
reject
public ImmutableByteSet reject(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceByteSet
- Specified by:
reject
in interfaceImmutableByteCollection
- Specified by:
reject
in interfaceImmutableByteSet
-
collect
public <V> ImmutableSet<V> collect(ByteToObjectFunction<? extends V> function)
Description copied from interface:ByteIterable
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 interfaceByteIterable
- Specified by:
collect
in interfaceByteSet
- Specified by:
collect
in interfaceImmutableByteCollection
- Specified by:
collect
in interfaceImmutableByteSet
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNone
in interfaceByteIterable
-
count
public int count(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.- Specified by:
count
in interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns true if any of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
Description copied from interface:ByteIterable
Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceByteIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceByteIterable
-
max
public byte max()
- Specified by:
max
in interfaceByteIterable
-
min
public byte min()
- Specified by:
min
in interfaceByteIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceByteIterable
-
writeReplace
private java.lang.Object writeReplace()
-
probe
int probe(byte element)
-
spreadAndMask
int spreadAndMask(byte element)
-
mask
private int mask(int spread)
-
-