PrimitiveIterable
ByteLongMap
, CharLongMap
, DoubleLongMap
, FloatLongMap
, ImmutableByteLongMap
, ImmutableCharLongMap
, ImmutableDoubleLongMap
, ImmutableFloatLongMap
, ImmutableIntLongMap
, ImmutableLongBag
, ImmutableLongCollection
, ImmutableLongList
, ImmutableLongLongMap
, ImmutableLongSet
, ImmutableLongStack
, ImmutableObjectLongMap<K>
, ImmutableShortLongMap
, IntLongMap
, LazyLongIterable
, LongBag
, LongList
, LongLongMap
, LongSet
, LongStack
, LongValuesMap
, MutableByteLongMap
, MutableCharLongMap
, MutableDoubleLongMap
, MutableFloatLongMap
, MutableIntLongMap
, MutableLongBag
, MutableLongCollection
, MutableLongList
, MutableLongLongMap
, MutableLongSet
, MutableLongStack
, MutableLongValuesMap
, MutableObjectLongMap<K>
, MutableShortLongMap
, ObjectLongMap<K>
, OrderedLongIterable
, ReversibleLongIterable
, ShortLongMap
AbstractImmutableLongSet
, AbstractImmutableObjectLongMap
, AbstractLazyLongIterable
, AbstractLongIterable
, AbstractLongSet
, AbstractLongStack
, AbstractMutableLongKeySet
, AbstractMutableLongValuesMap
, AbstractSynchronizedLongCollection
, AbstractUnmodifiableLongCollection
, ByteLongHashMap
, CharLongHashMap
, CollectBooleanToLongIterable
, CollectByteToLongIterable
, CollectCharToLongIterable
, CollectDoubleToLongIterable
, CollectFloatToLongIterable
, CollectIntToLongIterable
, CollectLongIterable
, CollectLongToLongIterable
, CollectShortToLongIterable
, DoubleLongHashMap
, FloatLongHashMap
, IntLongHashMap
, LazyLongIterableAdapter
, LongArrayList
, LongArrayStack
, LongHashBag
, LongHashSet
, LongLongHashMap
, ObjectLongHashMap
, ObjectLongHashMapWithHashingStrategy
, ReverseLongIterable
, SelectLongIterable
, ShortLongHashMap
, SynchronizedByteLongMap
, SynchronizedCharLongMap
, SynchronizedDoubleLongMap
, SynchronizedFloatLongMap
, SynchronizedIntLongMap
, SynchronizedLongBag
, SynchronizedLongCollection
, SynchronizedLongIterable
, SynchronizedLongList
, SynchronizedLongLongMap
, SynchronizedLongSet
, SynchronizedLongStack
, SynchronizedObjectLongMap
, SynchronizedShortLongMap
, UnmodifiableByteLongMap
, UnmodifiableCharLongMap
, UnmodifiableDoubleLongMap
, UnmodifiableFloatLongMap
, UnmodifiableIntLongMap
, UnmodifiableLongBag
, UnmodifiableLongCollection
, UnmodifiableLongList
, UnmodifiableLongLongMap
, UnmodifiableLongSet
, UnmodifiableLongStack
, UnmodifiableObjectLongMap
, UnmodifiableShortLongMap
public interface LongIterable extends PrimitiveIterable
Modifier and Type | Method | Description |
---|---|---|
boolean |
allSatisfy(LongPredicate predicate) |
Returns true if all of the elements in the LongIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(LongPredicate predicate) |
Returns true if any of the elements in the LongIterable return true for the
specified predicate, otherwise returns false.
|
LazyLongIterable |
asLazy() |
Returns a LazyLongIterable adapter wrapping the source LongIterable.
|
double |
average() |
|
<V> RichIterable<V> |
collect(LongToObjectFunction<? 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(LongToObjectFunction<? extends V> function,
R target) |
Same as
collect(LongToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(LongToBooleanFunction 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(LongToByteFunction 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(LongToCharFunction 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(LongToDoubleFunction 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(LongToFloatFunction 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(LongToIntFunction 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(LongToLongFunction 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(LongToShortFunction function,
R target) |
Returns the target
MutableShortCollection with the results of applying the specified function on each element
of the source collection. |
boolean |
contains(long value) |
Returns true if the value is contained in the LongIterable, and false if it is not.
|
boolean |
containsAll(long... source) |
Returns true if the all of the values specified in the source array are contained
in the LongIterable, and false if they are not.
|
boolean |
containsAll(LongIterable source) |
Returns true if the all of the values specified in the source LongIterable are contained
in the LongIterable, and false if they are not.
|
int |
count(LongPredicate predicate) |
Returns a count of the number of elements in the LongIterable that return true for the
specified predicate.
|
long |
detectIfNone(LongPredicate predicate,
long ifNone) |
|
void |
each(LongProcedure procedure) |
A synonym for forEach.
|
default <V,R extends Collection<V>> |
flatCollect(LongToObjectFunction<? extends Iterable<V>> function,
R target) |
flatCollect is a special case of collect(LongToObjectFunction) . |
void |
forEach(LongProcedure procedure) |
Applies the LongProcedure to each element in the LongIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function) |
|
LongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
long |
max() |
|
long |
maxIfEmpty(long defaultValue) |
|
double |
median() |
|
long |
min() |
|
long |
minIfEmpty(long defaultValue) |
|
boolean |
noneSatisfy(LongPredicate predicate) |
Returns true if none of the elements in the LongIterable return true for the
specified predicate, otherwise returns false.
|
LongIterable |
reject(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return false for the specified predicate.
|
default <R extends MutableLongCollection> |
reject(LongPredicate predicate,
R target) |
Same as
reject(LongPredicate) , only the results are added to the target MutableLongCollection. |
LongIterable |
select(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return true for the specified predicate.
|
default <R extends MutableLongCollection> |
select(LongPredicate predicate,
R target) |
Same as
select(LongPredicate) , only the results are added to the target MutableLongCollection. |
long |
sum() |
|
default LongSummaryStatistics |
summaryStatistics() |
|
long[] |
toArray() |
Converts the LongIterable to a primitive long array.
|
MutableLongBag |
toBag() |
Converts the LongIterable to a new MutableLongBag.
|
MutableLongList |
toList() |
Converts the LongIterable to a new MutableLongList.
|
MutableLongSet |
toSet() |
Converts the LongIterable to a new MutableLongSet.
|
long[] |
toSortedArray() |
|
MutableLongList |
toSortedList() |
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
LongIterator longIterator()
long[] toArray()
boolean contains(long value)
boolean containsAll(long... source)
boolean containsAll(LongIterable source)
void forEach(LongProcedure procedure)
void each(LongProcedure procedure)
LongIterable select(LongPredicate predicate)
LongIterable reject(LongPredicate predicate)
default <R extends MutableLongCollection> R select(LongPredicate predicate, R target)
select(LongPredicate)
, only the results are added to the target MutableLongCollection.default <R extends MutableLongCollection> R reject(LongPredicate predicate, R target)
reject(LongPredicate)
, only the results are added to the target MutableLongCollection.<V> RichIterable<V> collect(LongToObjectFunction<? extends V> function)
default <V,R extends Collection<V>> R collect(LongToObjectFunction<? extends V> function, R target)
collect(LongToObjectFunction)
, only the results are added to the target Collection.default <V,R extends Collection<V>> R flatCollect(LongToObjectFunction<? extends Iterable<V>> function, R target)
flatCollect
is a special case of collect(LongToObjectFunction)
. With collect
, when the LongToObjectFunction
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(LongToBooleanFunction 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(LongToByteFunction 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(LongToCharFunction 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(LongToShortFunction 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(LongToIntFunction 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(LongToFloatFunction 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(LongToLongFunction 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(LongToDoubleFunction function, R target)
MutableDoubleCollection
with the results of applying the specified function on each element
of the source collection.long detectIfNone(LongPredicate predicate, long ifNone)
int count(LongPredicate predicate)
boolean anySatisfy(LongPredicate predicate)
boolean allSatisfy(LongPredicate predicate)
boolean noneSatisfy(LongPredicate predicate)
MutableLongList toList()
MutableLongSet toSet()
MutableLongBag toBag()
LazyLongIterable asLazy()
<T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)
long sum()
default LongSummaryStatistics summaryStatistics()
long max()
long maxIfEmpty(long defaultValue)
long min()
long minIfEmpty(long defaultValue)
double average()
double median()
long[] toSortedArray()
MutableLongList toSortedList()
Copyright © 2004–2017. All rights reserved.