public interface FloatIterable extends PrimitiveIterable
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(FloatPredicate predicate)
Returns true if all of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(FloatPredicate predicate)
Returns true if any of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
LazyFloatIterable |
asLazy()
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.
|
double |
average() |
default double |
averageIfEmpty(double defaultValue) |
default RichIterable<FloatIterable> |
chunk(int size)
Partitions elements in fixed size chunks.
|
<V> RichIterable<V> |
collect(FloatToObjectFunction<? 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(FloatToObjectFunction<? extends V> function,
R target)
Same as
collect(FloatToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(FloatToBooleanFunction 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(FloatToByteFunction 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(FloatToCharFunction 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(FloatToDoubleFunction 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(FloatToFloatFunction 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(FloatToIntFunction 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(FloatToLongFunction 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(FloatToShortFunction function,
R target)
Returns the target
MutableShortCollection with the results of applying the specified function on each element
of the source collection. |
boolean |
contains(float value)
Returns true if the value is contained in the FloatIterable, and false if it is not.
|
default boolean |
containsAll(float... source)
Returns true if all of the values specified in the source array are contained
in the FloatIterable, and false if they are not.
|
default boolean |
containsAll(FloatIterable source)
Returns true if all of the values specified in the source FloatIterable are contained
in the FloatIterable, and false if they are not.
|
default boolean |
containsAny(float... source)
Returns true if any of the values specified in the source array are contained
in the FloatIterable, and false if they are not.
|
default boolean |
containsAny(FloatIterable source)
Returns true if any of the values specified in the source FloatIterable are contained
in the FloatIterable, and false if they are not.
|
default boolean |
containsNone(float... source)
Returns true if none of the values specified in the source array are contained
in the FloatIterable, and false if they are.
|
default boolean |
containsNone(FloatIterable source)
Returns true if none of the values specified in the source FloatIterable are contained
in the FloatIterable, and false if they are.
|
int |
count(FloatPredicate predicate)
Returns a count of the number of elements in the FloatIterable that return true for the
specified predicate.
|
float |
detectIfNone(FloatPredicate predicate,
float ifNone) |
void |
each(FloatProcedure procedure)
A synonym for forEach.
|
default <V,R extends Collection<V>> |
flatCollect(FloatToObjectFunction<? extends Iterable<V>> function,
R target)
flatCollect is a special case of collect(FloatToObjectFunction). |
FloatIterator |
floatIterator()
Returns a primitive iterator that can be used to iterate over the FloatIterable in an
imperative style.
|
default void |
forEach(FloatProcedure procedure)
Applies the FloatProcedure to each element in the FloatIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectFloatToObjectFunction<? super T,? extends T> function) |
default boolean |
injectIntoBoolean(boolean injectedValue,
BooleanFloatToBooleanFunction function)
Returns the final boolean result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default byte |
injectIntoByte(byte injectedValue,
ByteFloatToByteFunction function)
Returns the final byte result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default char |
injectIntoChar(char injectedValue,
CharFloatToCharFunction function)
Returns the final char result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default double |
injectIntoDouble(double injectedValue,
DoubleFloatToDoubleFunction function)
Returns the final double result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default float |
injectIntoFloat(float injectedValue,
FloatFloatToFloatFunction function)
Returns the final float result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default int |
injectIntoInt(int injectedValue,
IntFloatToIntFunction function)
Returns the final int result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default long |
injectIntoLong(long injectedValue,
LongFloatToLongFunction function)
Returns the final long result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
default short |
injectIntoShort(short injectedValue,
ShortFloatToShortFunction function)
Returns the final short result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.
|
float |
max() |
float |
maxIfEmpty(float defaultValue) |
double |
median() |
default double |
medianIfEmpty(double defaultValue) |
float |
min() |
float |
minIfEmpty(float defaultValue) |
default boolean |
noneSatisfy(FloatPredicate predicate)
Returns true if none of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
default double |
reduce(DoubleFloatToDoubleFunction accumulator) |
default double |
reduceIfEmpty(DoubleFloatToDoubleFunction accumulator,
double defaultValue) |
FloatIterable |
reject(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that
return false for the specified predicate.
|
default <R extends MutableFloatCollection> |
reject(FloatPredicate predicate,
R target)
Same as
reject(FloatPredicate) , only the results are added to the target MutableFloatCollection. |
FloatIterable |
select(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that
return true for the specified predicate.
|
default <R extends MutableFloatCollection> |
select(FloatPredicate predicate,
R target)
Same as
select(FloatPredicate) , only the results are added to the target MutableFloatCollection. |
double |
sum() |
default DoubleSummaryStatistics |
summaryStatistics() |
default FloatIterable |
tap(FloatProcedure procedure) |
float[] |
toArray()
Converts the FloatIterable to a primitive float array.
|
default float[] |
toArray(float[] target)
Converts the FloatIterable to a primitive float array.
|
MutableFloatBag |
toBag()
Converts the FloatIterable to a new MutableFloatBag.
|
MutableFloatList |
toList()
Converts the FloatIterable to a new MutableFloatList.
|
MutableFloatSet |
toSet()
Converts the FloatIterable to a new MutableFloatSet.
|
float[] |
toSortedArray() |
MutableFloatList |
toSortedList() |
default MutableFloatList |
toSortedList(FloatComparator comparator)
Converts the collection to a MutableFloatList implementation sorted using the provided comparator.
|
default <T> MutableFloatList |
toSortedListBy(FloatToObjectFunction<T> function)
Converts the collection to a MutableFloatListImplementation sorted based on the natural order of the key returned
by
function. |
default <T> MutableFloatList |
toSortedListBy(FloatToObjectFunction<T> function,
Comparator<? super T> comparator)
Converts the collection to a MutableFloatList implementation, which is sorted based on the key returned by
function using the provided comparator. |
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringFloatIterator floatIterator()
float[] toArray()
default float[] toArray(float[] target)
boolean contains(float value)
default boolean containsAll(float... source)
default boolean containsAll(FloatIterable source)
default boolean containsAny(float... source)
default boolean containsAny(FloatIterable source)
default boolean containsNone(float... source)
default boolean containsNone(FloatIterable source)
default void forEach(FloatProcedure procedure)
void each(FloatProcedure procedure)
default FloatIterable tap(FloatProcedure procedure)
FloatIterable select(FloatPredicate predicate)
FloatIterable reject(FloatPredicate predicate)
default <R extends MutableFloatCollection> R select(FloatPredicate predicate, R target)
select(FloatPredicate) , only the results are added to the target MutableFloatCollection.default <R extends MutableFloatCollection> R reject(FloatPredicate predicate, R target)
reject(FloatPredicate) , only the results are added to the target MutableFloatCollection.<V> RichIterable<V> collect(FloatToObjectFunction<? extends V> function)
default <V,R extends Collection<V>> R collect(FloatToObjectFunction<? extends V> function, R target)
collect(FloatToObjectFunction) , only the results are added to the target Collection.default <V,R extends Collection<V>> R flatCollect(FloatToObjectFunction<? extends Iterable<V>> function, R target)
flatCollect is a special case of collect(FloatToObjectFunction). With collect, when the FloatToObjectFunction 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(FloatToBooleanFunction 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(FloatToByteFunction 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(FloatToCharFunction 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(FloatToShortFunction 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(FloatToIntFunction 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(FloatToFloatFunction 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(FloatToLongFunction 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(FloatToDoubleFunction function, R target)
MutableDoubleCollection with the results of applying the specified function on each element
of the source collection.float detectIfNone(FloatPredicate predicate, float ifNone)
int count(FloatPredicate predicate)
boolean anySatisfy(FloatPredicate predicate)
boolean allSatisfy(FloatPredicate predicate)
default boolean noneSatisfy(FloatPredicate predicate)
MutableFloatList toList()
MutableFloatSet toSet()
MutableFloatBag toBag()
LazyFloatIterable asLazy()
<T> T injectInto(T injectedValue,
ObjectFloatToObjectFunction<? super T,? extends T> function)
default boolean injectIntoBoolean(boolean injectedValue,
BooleanFloatToBooleanFunction function)
default byte injectIntoByte(byte injectedValue,
ByteFloatToByteFunction function)
default char injectIntoChar(char injectedValue,
CharFloatToCharFunction function)
default short injectIntoShort(short injectedValue,
ShortFloatToShortFunction function)
default int injectIntoInt(int injectedValue,
IntFloatToIntFunction function)
default float injectIntoFloat(float injectedValue,
FloatFloatToFloatFunction function)
default long injectIntoLong(long injectedValue,
LongFloatToLongFunction function)
default double injectIntoDouble(double injectedValue,
DoubleFloatToDoubleFunction function)
default double reduceIfEmpty(DoubleFloatToDoubleFunction accumulator, double defaultValue)
reduce(DoubleFloatToDoubleFunction)default double reduce(DoubleFloatToDoubleFunction accumulator)
RichIterable.reduce(BinaryOperator)default RichIterable<FloatIterable> chunk(int size)
size - the number of elements per chunkRichIterable containing FloatIterables of size size, except the last will be
truncated if the elements don't divide evenly.double sum()
default DoubleSummaryStatistics summaryStatistics()
float max()
float maxIfEmpty(float defaultValue)
float min()
float minIfEmpty(float defaultValue)
double average()
default double averageIfEmpty(double defaultValue)
double median()
default double medianIfEmpty(double defaultValue)
float[] toSortedArray()
MutableFloatList toSortedList()
default MutableFloatList toSortedList(FloatComparator comparator)
default <T> MutableFloatList toSortedListBy(FloatToObjectFunction<T> function)
function.default <T> MutableFloatList toSortedListBy(FloatToObjectFunction<T> function, Comparator<? super T> comparator)
function using the provided comparator.Copyright © 2004–2022. All rights reserved.