PrimitiveIterable
ByteDoubleMap
, CharDoubleMap
, DoubleBag
, DoubleDoubleMap
, DoubleList
, DoubleSet
, DoubleStack
, DoubleValuesMap
, FloatDoubleMap
, ImmutableByteDoubleMap
, ImmutableCharDoubleMap
, ImmutableDoubleBag
, ImmutableDoubleCollection
, ImmutableDoubleDoubleMap
, ImmutableDoubleList
, ImmutableDoubleSet
, ImmutableDoubleStack
, ImmutableFloatDoubleMap
, ImmutableIntDoubleMap
, ImmutableLongDoubleMap
, ImmutableObjectDoubleMap<K>
, ImmutableShortDoubleMap
, IntDoubleMap
, LazyDoubleIterable
, LongDoubleMap
, MutableByteDoubleMap
, MutableCharDoubleMap
, MutableDoubleBag
, MutableDoubleCollection
, MutableDoubleDoubleMap
, MutableDoubleList
, MutableDoubleSet
, MutableDoubleStack
, MutableDoubleValuesMap
, MutableFloatDoubleMap
, MutableIntDoubleMap
, MutableLongDoubleMap
, MutableObjectDoubleMap<K>
, MutableShortDoubleMap
, ObjectDoubleMap<K>
, OrderedDoubleIterable
, ReversibleDoubleIterable
, ShortDoubleMap
AbstractDoubleIterable
, AbstractDoubleSet
, AbstractDoubleStack
, AbstractImmutableDoubleSet
, AbstractImmutableObjectDoubleMap
, AbstractLazyDoubleIterable
, AbstractMutableDoubleKeySet
, AbstractMutableDoubleValuesMap
, AbstractSynchronizedDoubleCollection
, AbstractUnmodifiableDoubleCollection
, ByteDoubleHashMap
, CharDoubleHashMap
, CollectBooleanToDoubleIterable
, CollectByteToDoubleIterable
, CollectCharToDoubleIterable
, CollectDoubleIterable
, CollectDoubleToDoubleIterable
, CollectFloatToDoubleIterable
, CollectIntToDoubleIterable
, CollectLongToDoubleIterable
, CollectShortToDoubleIterable
, DoubleArrayList
, DoubleArrayStack
, DoubleDoubleHashMap
, DoubleHashBag
, DoubleHashSet
, FloatDoubleHashMap
, IntDoubleHashMap
, LazyDoubleIterableAdapter
, LongDoubleHashMap
, ObjectDoubleHashMap
, ObjectDoubleHashMapWithHashingStrategy
, ReverseDoubleIterable
, SelectDoubleIterable
, ShortDoubleHashMap
, SynchronizedByteDoubleMap
, SynchronizedCharDoubleMap
, SynchronizedDoubleBag
, SynchronizedDoubleCollection
, SynchronizedDoubleDoubleMap
, SynchronizedDoubleIterable
, SynchronizedDoubleList
, SynchronizedDoubleSet
, SynchronizedDoubleStack
, SynchronizedFloatDoubleMap
, SynchronizedIntDoubleMap
, SynchronizedLongDoubleMap
, SynchronizedObjectDoubleMap
, SynchronizedShortDoubleMap
, TapDoubleIterable
, UnmodifiableByteDoubleMap
, UnmodifiableCharDoubleMap
, UnmodifiableDoubleBag
, UnmodifiableDoubleCollection
, UnmodifiableDoubleDoubleMap
, UnmodifiableDoubleList
, UnmodifiableDoubleSet
, UnmodifiableDoubleStack
, UnmodifiableFloatDoubleMap
, UnmodifiableIntDoubleMap
, UnmodifiableLongDoubleMap
, UnmodifiableObjectDoubleMap
, UnmodifiableShortDoubleMap
public interface DoubleIterable extends PrimitiveIterable
Modifier and Type | Method | Description |
---|---|---|
boolean |
allSatisfy(DoublePredicate predicate) |
Returns true if all of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(DoublePredicate predicate) |
Returns true if any of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
LazyDoubleIterable |
asLazy() |
Returns a LazyDoubleIterable adapter wrapping the source DoubleIterable.
|
double |
average() |
|
default double |
averageIfEmpty(double defaultValue) |
|
default RichIterable<DoubleIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> RichIterable<V> |
collect(DoubleToObjectFunction<? 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 java.util.Collection<V>> |
collect(DoubleToObjectFunction<? extends V> function,
R target) |
Same as
collect(DoubleToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(DoubleToBooleanFunction 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(DoubleToByteFunction 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(DoubleToCharFunction 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(DoubleToDoubleFunction 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(DoubleToFloatFunction 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(DoubleToIntFunction 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(DoubleToLongFunction 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(DoubleToShortFunction function,
R target) |
Returns the target
MutableShortCollection with the results of applying the specified function on each element
of the source collection. |
boolean |
contains(double value) |
Returns true if the value is contained in the DoubleIterable, and false if it is not.
|
boolean |
containsAll(double... source) |
Returns true if the all of the values specified in the source array are contained
in the DoubleIterable, and false if they are not.
|
boolean |
containsAll(DoubleIterable source) |
Returns true if the all of the values specified in the source DoubleIterable are contained
in the DoubleIterable, and false if they are not.
|
int |
count(DoublePredicate predicate) |
Returns a count of the number of elements in the DoubleIterable that return true for the
specified predicate.
|
double |
detectIfNone(DoublePredicate predicate,
double ifNone) |
|
DoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
void |
each(DoubleProcedure procedure) |
A synonym for forEach.
|
default <V,R extends java.util.Collection<V>> |
flatCollect(DoubleToObjectFunction<? extends java.lang.Iterable<V>> function,
R target) |
flatCollect is a special case of collect(DoubleToObjectFunction) . |
void |
forEach(DoubleProcedure procedure) |
Applies the DoubleProcedure to each element in the DoubleIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function) |
|
double |
max() |
|
double |
maxIfEmpty(double defaultValue) |
|
double |
median() |
|
default double |
medianIfEmpty(double defaultValue) |
|
double |
min() |
|
double |
minIfEmpty(double defaultValue) |
|
boolean |
noneSatisfy(DoublePredicate predicate) |
Returns true if none of the elements in the DoubleIterable return true for the
specified predicate, otherwise returns false.
|
DoubleIterable |
reject(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return false for the specified predicate.
|
default <R extends MutableDoubleCollection> |
reject(DoublePredicate predicate,
R target) |
Same as
reject(DoublePredicate) , only the results are added to the target MutableDoubleCollection. |
DoubleIterable |
select(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return true for the specified predicate.
|
default <R extends MutableDoubleCollection> |
select(DoublePredicate predicate,
R target) |
Same as
select(DoublePredicate) , only the results are added to the target MutableDoubleCollection. |
double |
sum() |
|
default java.util.DoubleSummaryStatistics |
summaryStatistics() |
|
default DoubleIterable |
tap(DoubleProcedure procedure) |
|
double[] |
toArray() |
Converts the DoubleIterable to a primitive double array.
|
MutableDoubleBag |
toBag() |
Converts the DoubleIterable to a new MutableDoubleBag.
|
MutableDoubleList |
toList() |
Converts the DoubleIterable to a new MutableDoubleList.
|
MutableDoubleSet |
toSet() |
Converts the DoubleIterable to a new MutableDoubleSet.
|
double[] |
toSortedArray() |
|
MutableDoubleList |
toSortedList() |
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
DoubleIterator doubleIterator()
double[] toArray()
boolean contains(double value)
boolean containsAll(double... source)
boolean containsAll(DoubleIterable source)
void forEach(DoubleProcedure procedure)
void each(DoubleProcedure procedure)
default DoubleIterable tap(DoubleProcedure procedure)
DoubleIterable select(DoublePredicate predicate)
DoubleIterable reject(DoublePredicate predicate)
default <R extends MutableDoubleCollection> R select(DoublePredicate predicate, R target)
select(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.default <R extends MutableDoubleCollection> R reject(DoublePredicate predicate, R target)
reject(DoublePredicate)
, only the results are added to the target MutableDoubleCollection.<V> RichIterable<V> collect(DoubleToObjectFunction<? extends V> function)
default <V,R extends java.util.Collection<V>> R collect(DoubleToObjectFunction<? extends V> function, R target)
collect(DoubleToObjectFunction)
, only the results are added to the target Collection.default <V,R extends java.util.Collection<V>> R flatCollect(DoubleToObjectFunction<? extends java.lang.Iterable<V>> function, R target)
flatCollect
is a special case of collect(DoubleToObjectFunction)
. With collect
, when the DoubleToObjectFunction
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(DoubleToBooleanFunction 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(DoubleToByteFunction 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(DoubleToCharFunction 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(DoubleToShortFunction 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(DoubleToIntFunction 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(DoubleToFloatFunction 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(DoubleToLongFunction 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(DoubleToDoubleFunction function, R target)
MutableDoubleCollection
with the results of applying the specified function on each element
of the source collection.double detectIfNone(DoublePredicate predicate, double ifNone)
int count(DoublePredicate predicate)
boolean anySatisfy(DoublePredicate predicate)
boolean allSatisfy(DoublePredicate predicate)
boolean noneSatisfy(DoublePredicate predicate)
MutableDoubleList toList()
MutableDoubleSet toSet()
MutableDoubleBag toBag()
LazyDoubleIterable asLazy()
<T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
default RichIterable<DoubleIterable> chunk(int size)
size
- the number of elements per chunkRichIterable
containing DoubleIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.double sum()
default java.util.DoubleSummaryStatistics summaryStatistics()
double max()
double maxIfEmpty(double defaultValue)
double min()
double minIfEmpty(double defaultValue)
double average()
default double averageIfEmpty(double defaultValue)
double median()
default double medianIfEmpty(double defaultValue)
double[] toSortedArray()
MutableDoubleList toSortedList()
Copyright © 2004–2018. All rights reserved.