Class ImmutableCharCharMapKeySet
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractCharIterable
-
- org.eclipse.collections.impl.set.primitive.AbstractCharSet
-
- org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableCharSet
-
- org.eclipse.collections.impl.map.mutable.primitive.ImmutableCharCharMapKeySet
-
- All Implemented Interfaces:
java.io.Serializable
,CharIterable
,ImmutableCharCollection
,PrimitiveIterable
,CharSet
,ImmutableCharSet
class ImmutableCharCharMapKeySet extends AbstractImmutableCharSet 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
ImmutableCharCharMapKeySet.InternalCharIterator
-
Field Summary
Fields Modifier and Type Field Description private static int
CACHE_LINE_SIZE
private boolean
containsOneKey
private boolean
containsZeroKey
private static char
EMPTY_KEY
private static int
INITIAL_LINEAR_PROBE
private static int
KEY_SIZE
private char[]
keysValues
private int
occupiedWithData
private static char
REMOVED_KEY
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableCharCharMapKeySet(char[] keysValues, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(CharPredicate predicate)
Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(CharPredicate predicate)
Returns true if any of the elements in the CharIterable 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
.CharIterator
charIterator()
Returns a primitive iterator that can be used to iterate over the CharIterable in an imperative style.<V> ImmutableSet<V>
collect(CharToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains(char value)
Returns true if the value is contained in the CharIterable, and false if it is not.int
count(CharPredicate predicate)
Returns a count of the number of elements in the CharIterable that return true for the specified predicate.char
detectIfNone(CharPredicate predicate, char ifNone)
void
each(CharProcedure procedure)
A synonym for forEach.void
forEach(CharProcedure procedure)
Applies the CharProcedure to each element in the CharIterable.int
hashCode()
Follows the same general contract asSet.hashCode()
.<T> T
injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
private static boolean
isEmptyKey(char key)
private static boolean
isNonSentinel(char key)
private static boolean
isRemovedKey(char key)
private int
mask(int spread)
char
max()
char
min()
boolean
noneSatisfy(CharPredicate predicate)
Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.(package private) int
probe(char element)
(package private) int
probeThree(char element, int removedIndex)
(package private) int
probeTwo(char element, int removedIndex)
ImmutableCharSet
reject(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.ImmutableCharSet
select(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.(package private) int
spreadAndMask(char element)
(package private) int
spreadTwoAndMask(char element)
long
sum()
char[]
toArray()
Converts the CharIterable to a primitive char array.char[]
toArray(char[] array)
Converts the CharIterable to a primitive char array.private java.lang.Object
writeReplace()
-
Methods inherited from class org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableCharSet
chunk, freeze, newWith, newWithAll, newWithout, newWithoutAll, toImmutable
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractCharSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractCharIterable
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.CharIterable
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.CharSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.ImmutableCharSet
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 char EMPTY_KEY
- See Also:
- Constant Field Values
-
REMOVED_KEY
private static final char 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 char[] keysValues
-
occupiedWithData
private final int occupiedWithData
-
containsZeroKey
private final boolean containsZeroKey
-
containsOneKey
private final boolean containsOneKey
-
-
Method Detail
-
isEmptyKey
private static boolean isEmptyKey(char key)
-
isRemovedKey
private static boolean isRemovedKey(char key)
-
isNonSentinel
private static boolean isNonSentinel(char key)
-
hashCode
public int hashCode()
Description copied from interface:CharSet
Follows the same general contract asSet.hashCode()
.- Specified by:
hashCode
in interfaceCharSet
- Specified by:
hashCode
in classAbstractCharSet
-
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
-
charIterator
public CharIterator charIterator()
Description copied from interface:CharIterable
Returns a primitive iterator that can be used to iterate over the CharIterable in an imperative style.- Specified by:
charIterator
in interfaceCharIterable
-
toArray
public char[] toArray()
Description copied from interface:CharIterable
Converts the CharIterable to a primitive char array.- Specified by:
toArray
in interfaceCharIterable
-
toArray
public char[] toArray(char[] array)
Description copied from interface:CharIterable
Converts the CharIterable to a primitive char 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 interfaceCharIterable
-
contains
public boolean contains(char value)
Description copied from interface:CharIterable
Returns true if the value is contained in the CharIterable, and false if it is not.- Specified by:
contains
in interfaceCharIterable
-
forEach
public void forEach(CharProcedure procedure)
Description copied from interface:CharIterable
Applies the CharProcedure to each element in the CharIterable.- Specified by:
forEach
in interfaceCharIterable
-
each
public void each(CharProcedure procedure)
Description copied from interface:CharIterable
A synonym for forEach.- Specified by:
each
in interfaceCharIterable
- Since:
- 7.0.
-
select
public ImmutableCharSet select(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharSet
- Specified by:
select
in interfaceImmutableCharCollection
- Specified by:
select
in interfaceImmutableCharSet
-
reject
public ImmutableCharSet reject(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharSet
- Specified by:
reject
in interfaceImmutableCharCollection
- Specified by:
reject
in interfaceImmutableCharSet
-
collect
public <V> ImmutableSet<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterable
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 interfaceCharIterable
- Specified by:
collect
in interfaceCharSet
- Specified by:
collect
in interfaceImmutableCharCollection
- Specified by:
collect
in interfaceImmutableCharSet
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
count
public int count(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a count of the number of elements in the CharIterable that return true for the specified predicate.- Specified by:
count
in interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
Description copied from interface:CharIterable
Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceCharIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
max
public char max()
- Specified by:
max
in interfaceCharIterable
-
min
public char min()
- Specified by:
min
in interfaceCharIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceCharIterable
-
writeReplace
private java.lang.Object writeReplace()
-
probe
int probe(char element)
-
probeTwo
int probeTwo(char element, int removedIndex)
-
probeThree
int probeThree(char element, int removedIndex)
-
spreadAndMask
int spreadAndMask(char element)
-
spreadTwoAndMask
int spreadTwoAndMask(char element)
-
mask
private int mask(int spread)
-
-