PrimitiveIterable
ByteShortMap
, CharShortMap
, DoubleShortMap
, FloatShortMap
, ImmutableByteShortMap
, ImmutableCharShortMap
, ImmutableDoubleShortMap
, ImmutableFloatShortMap
, ImmutableIntShortMap
, ImmutableLongShortMap
, ImmutableObjectShortMap<K>
, ImmutableShortBag
, ImmutableShortCollection
, ImmutableShortList
, ImmutableShortSet
, ImmutableShortShortMap
, ImmutableShortStack
, IntShortMap
, LazyShortIterable
, LongShortMap
, MutableByteShortMap
, MutableCharShortMap
, MutableDoubleShortMap
, MutableFloatShortMap
, MutableIntShortMap
, MutableLongShortMap
, MutableObjectShortMap<K>
, MutableShortBag
, MutableShortCollection
, MutableShortList
, MutableShortSet
, MutableShortShortMap
, MutableShortStack
, MutableShortValuesMap
, ObjectShortMap<K>
, OrderedShortIterable
, ReversibleShortIterable
, ShortBag
, ShortList
, ShortSet
, ShortShortMap
, ShortStack
, ShortValuesMap
AbstractImmutableObjectShortMap
, AbstractImmutableShortSet
, AbstractLazyShortIterable
, AbstractMutableShortKeySet
, AbstractMutableShortValuesMap
, AbstractShortIterable
, AbstractShortSet
, AbstractShortStack
, AbstractSynchronizedShortCollection
, AbstractUnmodifiableShortCollection
, ByteShortHashMap
, CharShortHashMap
, CollectBooleanToShortIterable
, CollectByteToShortIterable
, CollectCharToShortIterable
, CollectDoubleToShortIterable
, CollectFloatToShortIterable
, CollectIntToShortIterable
, CollectLongToShortIterable
, CollectShortIterable
, CollectShortToShortIterable
, DoubleShortHashMap
, FloatShortHashMap
, IntShortHashMap
, LazyShortIterableAdapter
, LongShortHashMap
, ObjectShortHashMap
, ObjectShortHashMapWithHashingStrategy
, ReverseShortIterable
, SelectShortIterable
, ShortArrayList
, ShortArrayStack
, ShortHashBag
, ShortHashSet
, ShortShortHashMap
, SynchronizedByteShortMap
, SynchronizedCharShortMap
, SynchronizedDoubleShortMap
, SynchronizedFloatShortMap
, SynchronizedIntShortMap
, SynchronizedLongShortMap
, SynchronizedObjectShortMap
, SynchronizedShortBag
, SynchronizedShortCollection
, SynchronizedShortIterable
, SynchronizedShortList
, SynchronizedShortSet
, SynchronizedShortShortMap
, SynchronizedShortStack
, TapShortIterable
, UnmodifiableByteShortMap
, UnmodifiableCharShortMap
, UnmodifiableDoubleShortMap
, UnmodifiableFloatShortMap
, UnmodifiableIntShortMap
, UnmodifiableLongShortMap
, UnmodifiableObjectShortMap
, UnmodifiableShortBag
, UnmodifiableShortCollection
, UnmodifiableShortList
, UnmodifiableShortSet
, UnmodifiableShortShortMap
, UnmodifiableShortStack
public interface ShortIterable extends PrimitiveIterable
Modifier and Type | Method | Description |
---|---|---|
boolean |
allSatisfy(ShortPredicate predicate) |
Returns true if all of the elements in the ShortIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(ShortPredicate predicate) |
Returns true if any of the elements in the ShortIterable return true for the
specified predicate, otherwise returns false.
|
LazyShortIterable |
asLazy() |
Returns a LazyShortIterable adapter wrapping the source ShortIterable.
|
double |
average() |
|
default double |
averageIfEmpty(double defaultValue) |
|
default RichIterable<ShortIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> RichIterable<V> |
collect(ShortToObjectFunction<? 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(ShortToObjectFunction<? extends V> function,
R target) |
Same as
collect(ShortToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(ShortToBooleanFunction 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(ShortToByteFunction 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(ShortToCharFunction 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(ShortToDoubleFunction 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(ShortToFloatFunction 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(ShortToIntFunction 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(ShortToLongFunction 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(ShortToShortFunction function,
R target) |
Returns the target
MutableShortCollection with the results of applying the specified function on each element
of the source collection. |
boolean |
contains(short value) |
Returns true if the value is contained in the ShortIterable, and false if it is not.
|
boolean |
containsAll(short... source) |
Returns true if the all of the values specified in the source array are contained
in the ShortIterable, and false if they are not.
|
boolean |
containsAll(ShortIterable source) |
Returns true if the all of the values specified in the source ShortIterable are contained
in the ShortIterable, and false if they are not.
|
int |
count(ShortPredicate predicate) |
Returns a count of the number of elements in the ShortIterable that return true for the
specified predicate.
|
short |
detectIfNone(ShortPredicate predicate,
short ifNone) |
|
void |
each(ShortProcedure procedure) |
A synonym for forEach.
|
default <V,R extends java.util.Collection<V>> |
flatCollect(ShortToObjectFunction<? extends java.lang.Iterable<V>> function,
R target) |
flatCollect is a special case of collect(ShortToObjectFunction) . |
void |
forEach(ShortProcedure procedure) |
Applies the ShortProcedure to each element in the ShortIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
|
short |
max() |
|
short |
maxIfEmpty(short defaultValue) |
|
double |
median() |
|
default double |
medianIfEmpty(double defaultValue) |
|
short |
min() |
|
short |
minIfEmpty(short defaultValue) |
|
boolean |
noneSatisfy(ShortPredicate predicate) |
Returns true if none of the elements in the ShortIterable return true for the
specified predicate, otherwise returns false.
|
default long |
reduce(LongShortToLongFunction accumulator) |
|
default long |
reduceIfEmpty(LongShortToLongFunction accumulator,
long defaultValue) |
|
ShortIterable |
reject(ShortPredicate predicate) |
Returns a new ShortIterable with all of the elements in the ShortIterable that
return false for the specified predicate.
|
default <R extends MutableShortCollection> |
reject(ShortPredicate predicate,
R target) |
Same as
reject(ShortPredicate) , only the results are added to the target MutableShortCollection. |
ShortIterable |
select(ShortPredicate predicate) |
Returns a new ShortIterable with all of the elements in the ShortIterable that
return true for the specified predicate.
|
default <R extends MutableShortCollection> |
select(ShortPredicate predicate,
R target) |
Same as
select(ShortPredicate) , only the results are added to the target MutableShortCollection. |
ShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
long |
sum() |
|
default java.util.IntSummaryStatistics |
summaryStatistics() |
|
default ShortIterable |
tap(ShortProcedure procedure) |
|
short[] |
toArray() |
Converts the ShortIterable to a primitive short array.
|
MutableShortBag |
toBag() |
Converts the ShortIterable to a new MutableShortBag.
|
MutableShortList |
toList() |
Converts the ShortIterable to a new MutableShortList.
|
MutableShortSet |
toSet() |
Converts the ShortIterable to a new MutableShortSet.
|
short[] |
toSortedArray() |
|
MutableShortList |
toSortedList() |
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
ShortIterator shortIterator()
short[] toArray()
boolean contains(short value)
boolean containsAll(short... source)
boolean containsAll(ShortIterable source)
void forEach(ShortProcedure procedure)
void each(ShortProcedure procedure)
default ShortIterable tap(ShortProcedure procedure)
ShortIterable select(ShortPredicate predicate)
ShortIterable reject(ShortPredicate predicate)
default <R extends MutableShortCollection> R select(ShortPredicate predicate, R target)
select(ShortPredicate)
, only the results are added to the target MutableShortCollection.default <R extends MutableShortCollection> R reject(ShortPredicate predicate, R target)
reject(ShortPredicate)
, only the results are added to the target MutableShortCollection.<V> RichIterable<V> collect(ShortToObjectFunction<? extends V> function)
default <V,R extends java.util.Collection<V>> R collect(ShortToObjectFunction<? extends V> function, R target)
collect(ShortToObjectFunction)
, only the results are added to the target Collection.default <V,R extends java.util.Collection<V>> R flatCollect(ShortToObjectFunction<? extends java.lang.Iterable<V>> function, R target)
flatCollect
is a special case of collect(ShortToObjectFunction)
. With collect
, when the ShortToObjectFunction
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(ShortToBooleanFunction 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(ShortToByteFunction 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(ShortToCharFunction 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(ShortToShortFunction 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(ShortToIntFunction 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(ShortToFloatFunction 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(ShortToLongFunction 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(ShortToDoubleFunction function, R target)
MutableDoubleCollection
with the results of applying the specified function on each element
of the source collection.short detectIfNone(ShortPredicate predicate, short ifNone)
int count(ShortPredicate predicate)
boolean anySatisfy(ShortPredicate predicate)
boolean allSatisfy(ShortPredicate predicate)
boolean noneSatisfy(ShortPredicate predicate)
MutableShortList toList()
MutableShortSet toSet()
MutableShortBag toBag()
LazyShortIterable asLazy()
<T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)
default long reduceIfEmpty(LongShortToLongFunction accumulator, long defaultValue)
reduce(LongShortToLongFunction)
default long reduce(LongShortToLongFunction accumulator)
RichIterable.reduce(BinaryOperator)
default RichIterable<ShortIterable> chunk(int size)
size
- the number of elements per chunkRichIterable
containing ShortIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.long sum()
default java.util.IntSummaryStatistics summaryStatistics()
short max()
short maxIfEmpty(short defaultValue)
short min()
short minIfEmpty(short defaultValue)
double average()
default double averageIfEmpty(double defaultValue)
double median()
default double medianIfEmpty(double defaultValue)
short[] toSortedArray()
MutableShortList toSortedList()
Copyright © 2004–2020. All rights reserved.