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.
-
Constructor Summary
Constructors Constructor Description AbstractMutableCharValuesMap()
-
Method Summary
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(Appendable appendable, String start, String separator, String end)
Prints a string representation of this collection onto the givenAppendable
.RichIterable<CharIterable>
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.boolean
contains(char value)
Returns true if the value is contained in the CharIterable, and false if it is not.boolean
containsAll(CharIterable source)
Returns true if the all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.boolean
containsValue(char value)
Returns whether or not this map contains the value.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 value)
void
each(CharProcedure procedure)
A synonym for forEach.void
forEach(CharProcedure procedure)
Applies the CharProcedure to each element in the CharIterable.void
forEachValue(CharProcedure procedure)
Iterates through each value in this map.boolean
isEmpty()
Returns true if this iterable has zero items.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.boolean
notEmpty()
The English equivalent of !this.isEmpty()MutableCharBag
reject(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.MutableCharBag
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.long
sum()
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 org.eclipse.collections.impl.primitive.AbstractCharIterable
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, 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, flatCollect, injectInto, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.map.primitive.CharValuesMap
tap, values
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableCharValuesMap
charIterator, clear
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableCharValuesMap
public AbstractMutableCharValuesMap()
-
-
Method Details
-
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
-
containsAll
Description copied from interface:CharIterable
Returns true if the all of the values specified in the source CharIterable are contained in the CharIterable, and false if they are not.- Specified by:
containsAll
in interfaceCharIterable
- Overrides:
containsAll
in classAbstractCharIterable
-
max
public char max()- Specified by:
max
in interfaceCharIterable
-
min
public char min()- Specified by:
min
in interfaceCharIterable
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
forEach
Description copied from interface:CharIterable
Applies the CharProcedure to each element in the CharIterable.- Specified by:
forEach
in interfaceCharIterable
-
each
Description copied from interface:CharIterable
A synonym for forEach.- Specified by:
each
in interfaceCharIterable
- Since:
- 7.0.
-
appendString
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
-
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[] target)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
-
select
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 interfaceCharValuesMap
- Specified by:
select
in interfaceMutableCharValuesMap
-
reject
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 interfaceCharValuesMap
- Specified by:
reject
in interfaceMutableCharValuesMap
-
collect
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 interfaceCharValuesMap
- Specified by:
collect
in interfaceMutableCharValuesMap
-
detectIfNone
- Specified by:
detectIfNone
in interfaceCharIterable
-
count
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
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
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
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
-
chunk
Description copied from interface:CharIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceCharIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingCharIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()- Specified by:
sum
in interfaceCharIterable
-
containsValue
public boolean containsValue(char value)Description copied from interface:CharValuesMap
Returns whether or not this map contains the value.- Specified by:
containsValue
in interfaceCharValuesMap
- Parameters:
value
- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:CharValuesMap
Iterates through each value in this map.- Specified by:
forEachValue
in interfaceCharValuesMap
- Parameters:
procedure
- the procedure to invoke for each value in this map.
-