Class AbstractMutableCharValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractCharIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableCharValuesMap
- All Implemented Interfaces:
CharIterable, CharValuesMap, MutableCharValuesMap, PrimitiveIterable
- Direct Known Subclasses:
ByteCharHashMap, CharCharHashMap, DoubleCharHashMap, FloatCharHashMap, IntCharHashMap, LongCharHashMap, ShortCharHashMap
public abstract class AbstractMutableCharValuesMap
extends AbstractCharIterable
implements MutableCharValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
- Since:
- 6.0.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEmptyKeyValue(char value) protected voidaddRemovedKeyValue(char value) 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(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.chunk(int size) Partitions elements in fixed size chunks.<V> MutableBag<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.booleancontainsAll(CharIterable source) Returns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.booleancontainsValue(char value) Returns whether or not this map contains the value.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 value) voideach(CharProcedure procedure) A synonym for forEach.voidforEachValue(CharProcedure procedure) Iterates through each value in this map.protected abstract charprotected abstract intprotected abstract AbstractMutableCharValuesMap.SentinelValuesprotected abstract intprotected abstract chargetValueAtIndex(int index) booleanisEmpty()Returns true if this iterable has zero items.protected abstract booleanisNonSentinelAtIndex(int index) charmax()charmin()booleannotEmpty()The English equivalent of !this.isEmpty()reject(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.protected voidprotected voidselect(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.protected abstract voidintsize()Returns the number of items in this iterable.longsum()char[]toArray()Converts the CharIterable to a primitive char array.char[]toArray(char[] target) Converts the CharIterable to a primitive char array.Methods inherited from class AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CharIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface CharValuesMap
tap, valuesMethods inherited from interface MutableCharValuesMap
charIterator, clearMethods inherited from interface PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableCharValuesMap
public AbstractMutableCharValuesMap()
-
-
Method Details
-
getOccupiedWithData
protected abstract int getOccupiedWithData() -
getSentinelValues
-
setSentinelValuesNull
protected abstract void setSentinelValuesNull() -
getEmptyValue
protected abstract char getEmptyValue() -
getValueAtIndex
protected abstract char getValueAtIndex(int index) -
getTableSize
protected abstract int getTableSize() -
isNonSentinelAtIndex
protected abstract boolean isNonSentinelAtIndex(int index) -
addEmptyKeyValue
protected void addEmptyKeyValue(char value) -
removeEmptyKey
protected void removeEmptyKey() -
addRemovedKeyValue
protected void addRemovedKeyValue(char value) -
removeRemovedKey
protected void removeRemovedKey() -
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
-
containsAll
Description copied from interface:CharIterableReturns true if all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.- Specified by:
containsAllin interfaceCharIterable
-
max
public char max()- Specified by:
maxin interfaceCharIterable
-
min
public char min()- Specified by:
minin interfaceCharIterable
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
each
Description copied from interface:CharIterableA synonym for forEach.- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
appendString
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
-
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[] target) 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
-
select
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 interfaceCharValuesMap- Specified by:
selectin interfaceMutableCharValuesMap
-
reject
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 interfaceCharValuesMap- Specified by:
rejectin interfaceMutableCharValuesMap
-
collect
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 interfaceCharValuesMap- Specified by:
collectin interfaceMutableCharValuesMap
-
detectIfNone
- Specified by:
detectIfNonein interfaceCharIterable
-
count
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
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
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
-
chunk
Description copied from interface:CharIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceCharIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingCharIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()- Specified by:
sumin interfaceCharIterable
-
containsValue
public boolean containsValue(char value) Description copied from interface:CharValuesMapReturns whether or not this map contains the value.- Specified by:
containsValuein interfaceCharValuesMap- Parameters:
value- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:CharValuesMapIterates through each value in this map.- Specified by:
forEachValuein interfaceCharValuesMap- Parameters:
procedure- the procedure to invoke for each value in this map.
-