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 classImmutableCharCharMapKeySet.InternalCharIterator
-
Field Summary
Fields Modifier and Type Field Description private static intCACHE_LINE_SIZEprivate booleancontainsOneKeyprivate booleancontainsZeroKeyprivate static charEMPTY_KEYprivate static intINITIAL_LINEAR_PROBEprivate static intKEY_SIZEprivate char[]keysValuesprivate intoccupiedWithDataprivate static charREMOVED_KEYprivate static longserialVersionUID
-
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 booleanallSatisfy(CharPredicate predicate)Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(CharPredicate predicate)Returns true if any of the elements in the CharIterable 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.CharIteratorcharIterator()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.booleancontains(char value)Returns true if the value is contained in the CharIterable, and false if it is not.intcount(CharPredicate predicate)Returns a count of the number of elements in the CharIterable that return true for the specified predicate.chardetectIfNone(CharPredicate predicate, char ifNone)voideach(CharProcedure procedure)A synonym for forEach.voidforEach(CharProcedure procedure)Applies the CharProcedure to each element in the CharIterable.inthashCode()Follows the same general contract asSet.hashCode().<T> TinjectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)private static booleanisEmptyKey(char key)private static booleanisNonSentinel(char key)private static booleanisRemovedKey(char key)private intmask(int spread)charmax()charmin()booleannoneSatisfy(CharPredicate predicate)Returns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.(package private) intprobe(char element)(package private) intprobeThree(char element, int removedIndex)(package private) intprobeTwo(char element, int removedIndex)ImmutableCharSetreject(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.ImmutableCharSetselect(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.intsize()Returns the number of items in this iterable.(package private) intspreadAndMask(char element)(package private) intspreadTwoAndMask(char element)longsum()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.ObjectwriteReplace()-
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:CharSetFollows the same general contract asSet.hashCode().- Specified by:
hashCodein interfaceCharSet- Specified by:
hashCodein classAbstractCharSet
-
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
-
charIterator
public CharIterator charIterator()
Description copied from interface:CharIterableReturns a primitive iterator that can be used to iterate over the CharIterable in an imperative style.- Specified by:
charIteratorin interfaceCharIterable
-
toArray
public char[] toArray()
Description copied from interface:CharIterableConverts the CharIterable to a primitive char array.- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] array)
Description copied from interface:CharIterableConverts 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:
toArrayin interfaceCharIterable
-
contains
public boolean contains(char value)
Description copied from interface:CharIterableReturns true if the value is contained in the CharIterable, and false if it is not.- Specified by:
containsin interfaceCharIterable
-
forEach
public void forEach(CharProcedure procedure)
Description copied from interface:CharIterableApplies the CharProcedure to each element in the CharIterable.- Specified by:
forEachin interfaceCharIterable
-
each
public void each(CharProcedure procedure)
Description copied from interface:CharIterableA synonym for forEach.- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
select
public ImmutableCharSet select(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharSet- Specified by:
selectin interfaceImmutableCharCollection- Specified by:
selectin interfaceImmutableCharSet
-
reject
public ImmutableCharSet reject(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharSet- Specified by:
rejectin interfaceImmutableCharCollection- Specified by:
rejectin interfaceImmutableCharSet
-
collect
public <V> ImmutableSet<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterableReturns 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 interfaceCharIterable- Specified by:
collectin interfaceCharSet- Specified by:
collectin interfaceImmutableCharCollection- Specified by:
collectin interfaceImmutableCharSet
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNonein interfaceCharIterable
-
count
public int count(CharPredicate predicate)
Description copied from interface:CharIterableReturns a count of the number of elements in the CharIterable that return true for the specified predicate.- Specified by:
countin interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
Description copied from interface:CharIterableReturns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
Description copied from interface:CharIterableReturns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
Description copied from interface:CharIterableReturns true if none of the elements in the CharIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceCharIterable
-
sum
public long sum()
- Specified by:
sumin interfaceCharIterable
-
max
public char max()
- Specified by:
maxin interfaceCharIterable
-
min
public char min()
- Specified by:
minin interfaceCharIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin 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)
-
-