PrimitiveIterable
ByteCharMap
, CharBag
, CharCharMap
, CharList
, CharSet
, CharStack
, CharValuesMap
, DoubleCharMap
, FloatCharMap
, ImmutableByteCharMap
, ImmutableCharBag
, ImmutableCharCharMap
, ImmutableCharCollection
, ImmutableCharList
, ImmutableCharSet
, ImmutableCharStack
, ImmutableDoubleCharMap
, ImmutableFloatCharMap
, ImmutableIntCharMap
, ImmutableLongCharMap
, ImmutableObjectCharMap<K>
, ImmutableShortCharMap
, IntCharMap
, LazyCharIterable
, LongCharMap
, MutableByteCharMap
, MutableCharBag
, MutableCharCharMap
, MutableCharCollection
, MutableCharList
, MutableCharSet
, MutableCharStack
, MutableCharValuesMap
, MutableDoubleCharMap
, MutableFloatCharMap
, MutableIntCharMap
, MutableLongCharMap
, MutableObjectCharMap<K>
, MutableShortCharMap
, ObjectCharMap<K>
, OrderedCharIterable
, ReversibleCharIterable
, ShortCharMap
AbstractCharIterable
, AbstractCharSet
, AbstractCharStack
, AbstractImmutableCharSet
, AbstractImmutableObjectCharMap
, AbstractLazyCharIterable
, AbstractMutableCharKeySet
, AbstractMutableCharValuesMap
, AbstractSynchronizedCharCollection
, AbstractUnmodifiableCharCollection
, ByteCharHashMap
, CharAdapter
, CharArrayList
, CharArrayStack
, CharCharHashMap
, CharHashBag
, CharHashSet
, CollectBooleanToCharIterable
, CollectByteToCharIterable
, CollectCharIterable
, CollectCharToCharIterable
, CollectDoubleToCharIterable
, CollectFloatToCharIterable
, CollectIntToCharIterable
, CollectLongToCharIterable
, CollectShortToCharIterable
, DoubleCharHashMap
, FloatCharHashMap
, IntCharHashMap
, LazyCharIterableAdapter
, LongCharHashMap
, ObjectCharHashMap
, ObjectCharHashMapWithHashingStrategy
, ReverseCharIterable
, SelectCharIterable
, ShortCharHashMap
, SynchronizedByteCharMap
, SynchronizedCharBag
, SynchronizedCharCharMap
, SynchronizedCharCollection
, SynchronizedCharIterable
, SynchronizedCharList
, SynchronizedCharSet
, SynchronizedCharStack
, SynchronizedDoubleCharMap
, SynchronizedFloatCharMap
, SynchronizedIntCharMap
, SynchronizedLongCharMap
, SynchronizedObjectCharMap
, SynchronizedShortCharMap
, TapCharIterable
, UnmodifiableByteCharMap
, UnmodifiableCharBag
, UnmodifiableCharCharMap
, UnmodifiableCharCollection
, UnmodifiableCharList
, UnmodifiableCharSet
, UnmodifiableCharStack
, UnmodifiableDoubleCharMap
, UnmodifiableFloatCharMap
, UnmodifiableIntCharMap
, UnmodifiableLongCharMap
, UnmodifiableObjectCharMap
, UnmodifiableShortCharMap
public interface CharIterable extends PrimitiveIterable
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.
|
LazyCharIterable |
asLazy() |
Returns a LazyCharIterable adapter wrapping the source CharIterable.
|
double |
average() |
|
default double |
averageIfEmpty(double defaultValue) |
|
CharIterator |
charIterator() |
Returns a primitive iterator that can be used to iterate over the CharIterable in an
imperative style.
|
default RichIterable<CharIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> RichIterable<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.
|
default <V,R extends Collection<V>> |
collect(CharToObjectFunction<? extends V> function,
R target) |
Same as
collect(CharToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(CharToBooleanFunction function,
R target) |
Returns the target
MutableBooleanCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableByteCollection> |
collectByte(CharToByteFunction function,
R target) |
Returns the target
MutableByteCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableCharCollection> |
collectChar(CharToCharFunction function,
R target) |
Returns the target
MutableCharCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableDoubleCollection> |
collectDouble(CharToDoubleFunction function,
R target) |
Returns the target
MutableDoubleCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableFloatCollection> |
collectFloat(CharToFloatFunction function,
R target) |
Returns the target
MutableFloatCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableIntCollection> |
collectInt(CharToIntFunction function,
R target) |
Returns the target
MutableIntCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableLongCollection> |
collectLong(CharToLongFunction function,
R target) |
Returns the target
MutableLongCollection with the results of applying the specified function on each element
of the source collection. |
default <R extends MutableShortCollection> |
collectShort(CharToShortFunction function,
R target) |
Returns the target
MutableShortCollection 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(char... source) |
Returns true if the all of the values specified in the source array are contained
in the CharIterable, and false if they are 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.
|
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.
|
default <V,R extends Collection<V>> |
flatCollect(CharToObjectFunction<? extends Iterable<V>> function,
R target) |
flatCollect is a special case of collect(CharToObjectFunction) . |
void |
forEach(CharProcedure procedure) |
Applies the CharProcedure to each element in the CharIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function) |
|
char |
max() |
|
char |
maxIfEmpty(char defaultValue) |
|
double |
median() |
|
default double |
medianIfEmpty(double defaultValue) |
|
char |
min() |
|
char |
minIfEmpty(char defaultValue) |
|
boolean |
noneSatisfy(CharPredicate predicate) |
Returns true if none of the elements in the CharIterable return true for the
specified predicate, otherwise returns false.
|
default long |
reduce(LongCharToLongFunction accumulator) |
|
default long |
reduceIfEmpty(LongCharToLongFunction accumulator,
long defaultValue) |
|
CharIterable |
reject(CharPredicate predicate) |
Returns a new CharIterable with all of the elements in the CharIterable that
return false for the specified predicate.
|
default <R extends MutableCharCollection> |
reject(CharPredicate predicate,
R target) |
Same as
reject(CharPredicate) , only the results are added to the target MutableCharCollection. |
CharIterable |
select(CharPredicate predicate) |
Returns a new CharIterable with all of the elements in the CharIterable that
return true for the specified predicate.
|
default <R extends MutableCharCollection> |
select(CharPredicate predicate,
R target) |
Same as
select(CharPredicate) , only the results are added to the target MutableCharCollection. |
long |
sum() |
|
default IntSummaryStatistics |
summaryStatistics() |
|
default CharIterable |
tap(CharProcedure procedure) |
|
char[] |
toArray() |
Converts the CharIterable to a primitive char array.
|
MutableCharBag |
toBag() |
Converts the CharIterable to a new MutableCharBag.
|
MutableCharList |
toList() |
Converts the CharIterable to a new MutableCharList.
|
MutableCharSet |
toSet() |
Converts the CharIterable to a new MutableCharSet.
|
char[] |
toSortedArray() |
|
MutableCharList |
toSortedList() |
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
CharIterator charIterator()
char[] toArray()
boolean contains(char value)
boolean containsAll(char... source)
boolean containsAll(CharIterable source)
void forEach(CharProcedure procedure)
void each(CharProcedure procedure)
default CharIterable tap(CharProcedure procedure)
CharIterable select(CharPredicate predicate)
CharIterable reject(CharPredicate predicate)
default <R extends MutableCharCollection> R select(CharPredicate predicate, R target)
select(CharPredicate)
, only the results are added to the target MutableCharCollection.default <R extends MutableCharCollection> R reject(CharPredicate predicate, R target)
reject(CharPredicate)
, only the results are added to the target MutableCharCollection.<V> RichIterable<V> collect(CharToObjectFunction<? extends V> function)
default <V,R extends Collection<V>> R collect(CharToObjectFunction<? extends V> function, R target)
collect(CharToObjectFunction)
, only the results are added to the target Collection.default <V,R extends Collection<V>> R flatCollect(CharToObjectFunction<? extends Iterable<V>> function, R target)
flatCollect
is a special case of collect(CharToObjectFunction)
. With collect
, when the CharToObjectFunction
returns
a collection, the result is a collection of collections. flatCollect
outputs a single "flattened" collection
instead. This method is commonly called flatMap.default <R extends MutableBooleanCollection> R collectBoolean(CharToBooleanFunction function, R target)
MutableBooleanCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableByteCollection> R collectByte(CharToByteFunction function, R target)
MutableByteCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableCharCollection> R collectChar(CharToCharFunction function, R target)
MutableCharCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableShortCollection> R collectShort(CharToShortFunction function, R target)
MutableShortCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableIntCollection> R collectInt(CharToIntFunction function, R target)
MutableIntCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableFloatCollection> R collectFloat(CharToFloatFunction function, R target)
MutableFloatCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableLongCollection> R collectLong(CharToLongFunction function, R target)
MutableLongCollection
with the results of applying the specified function on each element
of the source collection.default <R extends MutableDoubleCollection> R collectDouble(CharToDoubleFunction function, R target)
MutableDoubleCollection
with the results of applying the specified function on each element
of the source collection.char detectIfNone(CharPredicate predicate, char ifNone)
int count(CharPredicate predicate)
boolean anySatisfy(CharPredicate predicate)
boolean allSatisfy(CharPredicate predicate)
boolean noneSatisfy(CharPredicate predicate)
MutableCharList toList()
MutableCharSet toSet()
MutableCharBag toBag()
LazyCharIterable asLazy()
<T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
default long reduceIfEmpty(LongCharToLongFunction accumulator, long defaultValue)
reduce(LongCharToLongFunction)
default long reduce(LongCharToLongFunction accumulator)
RichIterable.reduce(BinaryOperator)
default RichIterable<CharIterable> chunk(int size)
size
- the number of elements per chunkRichIterable
containing CharIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.long sum()
default IntSummaryStatistics summaryStatistics()
char max()
char maxIfEmpty(char defaultValue)
char min()
char minIfEmpty(char defaultValue)
double average()
default double averageIfEmpty(double defaultValue)
double median()
default double medianIfEmpty(double defaultValue)
char[] toSortedArray()
MutableCharList toSortedList()
Copyright © 2004–2019. All rights reserved.