PrimitiveIterable
BooleanBag
, BooleanList
, BooleanSet
, BooleanStack
, BooleanValuesMap
, ByteBooleanMap
, CharBooleanMap
, DoubleBooleanMap
, FloatBooleanMap
, ImmutableBooleanBag
, ImmutableBooleanCollection
, ImmutableBooleanList
, ImmutableBooleanSet
, ImmutableBooleanStack
, ImmutableByteBooleanMap
, ImmutableCharBooleanMap
, ImmutableDoubleBooleanMap
, ImmutableFloatBooleanMap
, ImmutableIntBooleanMap
, ImmutableLongBooleanMap
, ImmutableObjectBooleanMap<K>
, ImmutableShortBooleanMap
, IntBooleanMap
, LazyBooleanIterable
, LongBooleanMap
, MutableBooleanBag
, MutableBooleanCollection
, MutableBooleanList
, MutableBooleanSet
, MutableBooleanStack
, MutableBooleanValuesMap
, MutableByteBooleanMap
, MutableCharBooleanMap
, MutableDoubleBooleanMap
, MutableFloatBooleanMap
, MutableIntBooleanMap
, MutableLongBooleanMap
, MutableObjectBooleanMap<K>
, MutableShortBooleanMap
, ObjectBooleanMap<K>
, OrderedBooleanIterable
, ReversibleBooleanIterable
, ShortBooleanMap
AbstractBooleanIterable
, AbstractBooleanStack
, AbstractImmutableObjectBooleanMap
, AbstractLazyBooleanIterable
, AbstractMutableBooleanValuesMap
, AbstractSynchronizedBooleanCollection
, AbstractUnmodifiableBooleanCollection
, BooleanArrayList
, BooleanArrayStack
, BooleanHashBag
, BooleanHashSet
, ByteBooleanHashMap
, CharBooleanHashMap
, CollectBooleanIterable
, CollectBooleanToBooleanIterable
, CollectByteToBooleanIterable
, CollectCharToBooleanIterable
, CollectDoubleToBooleanIterable
, CollectFloatToBooleanIterable
, CollectIntToBooleanIterable
, CollectLongToBooleanIterable
, CollectShortToBooleanIterable
, DoubleBooleanHashMap
, FloatBooleanHashMap
, IntBooleanHashMap
, LazyBooleanIterableAdapter
, LongBooleanHashMap
, ObjectBooleanHashMap
, ObjectBooleanHashMapWithHashingStrategy
, ReverseBooleanIterable
, SelectBooleanIterable
, ShortBooleanHashMap
, SynchronizedBooleanBag
, SynchronizedBooleanCollection
, SynchronizedBooleanIterable
, SynchronizedBooleanList
, SynchronizedBooleanSet
, SynchronizedBooleanStack
, SynchronizedByteBooleanMap
, SynchronizedCharBooleanMap
, SynchronizedDoubleBooleanMap
, SynchronizedFloatBooleanMap
, SynchronizedIntBooleanMap
, SynchronizedLongBooleanMap
, SynchronizedObjectBooleanMap
, SynchronizedShortBooleanMap
, TapBooleanIterable
, UnmodifiableBooleanBag
, UnmodifiableBooleanCollection
, UnmodifiableBooleanList
, UnmodifiableBooleanSet
, UnmodifiableBooleanStack
, UnmodifiableByteBooleanMap
, UnmodifiableCharBooleanMap
, UnmodifiableDoubleBooleanMap
, UnmodifiableFloatBooleanMap
, UnmodifiableIntBooleanMap
, UnmodifiableLongBooleanMap
, UnmodifiableObjectBooleanMap
, UnmodifiableShortBooleanMap
public interface BooleanIterable extends PrimitiveIterable
Modifier and Type | Method | Description |
---|---|---|
boolean |
allSatisfy(BooleanPredicate predicate) |
Returns true if all of the elements in the BooleanIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(BooleanPredicate predicate) |
Returns true if any of the elements in the BooleanIterable return true for the
specified predicate, otherwise returns false.
|
LazyBooleanIterable |
asLazy() |
Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.
|
BooleanIterator |
booleanIterator() |
Returns a primitive iterator that can be used to iterate over the BooleanIterable in an
imperative style.
|
default RichIterable<BooleanIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> RichIterable<V> |
collect(BooleanToObjectFunction<? 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(BooleanToObjectFunction<? extends V> function,
R target) |
Same as
collect(BooleanToObjectFunction) , only the results are added to the target Collection. |
default <R extends MutableBooleanCollection> |
collectBoolean(BooleanToBooleanFunction 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(BooleanToByteFunction 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(BooleanToCharFunction 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(BooleanToDoubleFunction 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(BooleanToFloatFunction 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(BooleanToIntFunction 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(BooleanToLongFunction 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(BooleanToShortFunction function,
R target) |
Returns the target
MutableShortCollection with the results of applying the specified function on each element
of the source collection. |
boolean |
contains(boolean value) |
Returns true if the value is contained in the BooleanIterable, and false if it is not.
|
boolean |
containsAll(boolean... source) |
Returns true if the all of the values specified in the source array are contained
in the BooleanIterable, and false if they are not.
|
boolean |
containsAll(BooleanIterable source) |
Returns true if the all of the values specified in the source BooleanIterable are contained
in the BooleanIterable, and false if they are not.
|
int |
count(BooleanPredicate predicate) |
Returns a count of the number of elements in the BooleanIterable that return true for the
specified predicate.
|
boolean |
detectIfNone(BooleanPredicate predicate,
boolean ifNone) |
|
void |
each(BooleanProcedure procedure) |
A synonym for forEach.
|
default <V,R extends java.util.Collection<V>> |
flatCollect(BooleanToObjectFunction<? extends java.lang.Iterable<V>> function,
R target) |
flatCollect is a special case of collect(BooleanToObjectFunction) . |
void |
forEach(BooleanProcedure procedure) |
Applies the BooleanProcedure to each element in the BooleanIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectBooleanToObjectFunction<? super T,? extends T> function) |
|
boolean |
noneSatisfy(BooleanPredicate predicate) |
Returns true if none of the elements in the BooleanIterable return true for the
specified predicate, otherwise returns false.
|
default boolean |
reduce(BooleanBooleanToBooleanFunction accumulator) |
|
default boolean |
reduceIfEmpty(BooleanBooleanToBooleanFunction accumulator,
boolean defaultValue) |
|
BooleanIterable |
reject(BooleanPredicate predicate) |
Returns a new BooleanIterable with all of the elements in the BooleanIterable that
return false for the specified predicate.
|
default <R extends MutableBooleanCollection> |
reject(BooleanPredicate predicate,
R target) |
Same as
reject(BooleanPredicate) , only the results are added to the target MutableBooleanCollection. |
BooleanIterable |
select(BooleanPredicate predicate) |
Returns a new BooleanIterable with all of the elements in the BooleanIterable that
return true for the specified predicate.
|
default <R extends MutableBooleanCollection> |
select(BooleanPredicate predicate,
R target) |
Same as
select(BooleanPredicate) , only the results are added to the target MutableBooleanCollection. |
default BooleanIterable |
tap(BooleanProcedure procedure) |
|
boolean[] |
toArray() |
Converts the BooleanIterable to a primitive boolean array.
|
MutableBooleanBag |
toBag() |
Converts the BooleanIterable to a new MutableBooleanBag.
|
MutableBooleanList |
toList() |
Converts the BooleanIterable to a new MutableBooleanList.
|
MutableBooleanSet |
toSet() |
Converts the BooleanIterable to a new MutableBooleanSet.
|
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
BooleanIterator booleanIterator()
boolean[] toArray()
boolean contains(boolean value)
boolean containsAll(boolean... source)
boolean containsAll(BooleanIterable source)
void forEach(BooleanProcedure procedure)
void each(BooleanProcedure procedure)
default BooleanIterable tap(BooleanProcedure procedure)
BooleanIterable select(BooleanPredicate predicate)
BooleanIterable reject(BooleanPredicate predicate)
default <R extends MutableBooleanCollection> R select(BooleanPredicate predicate, R target)
select(BooleanPredicate)
, only the results are added to the target MutableBooleanCollection.default <R extends MutableBooleanCollection> R reject(BooleanPredicate predicate, R target)
reject(BooleanPredicate)
, only the results are added to the target MutableBooleanCollection.<V> RichIterable<V> collect(BooleanToObjectFunction<? extends V> function)
default <V,R extends java.util.Collection<V>> R collect(BooleanToObjectFunction<? extends V> function, R target)
collect(BooleanToObjectFunction)
, only the results are added to the target Collection.default <V,R extends java.util.Collection<V>> R flatCollect(BooleanToObjectFunction<? extends java.lang.Iterable<V>> function, R target)
flatCollect
is a special case of collect(BooleanToObjectFunction)
. With collect
, when the BooleanToObjectFunction
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(BooleanToBooleanFunction 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(BooleanToByteFunction 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(BooleanToCharFunction 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(BooleanToShortFunction 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(BooleanToIntFunction 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(BooleanToFloatFunction 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(BooleanToLongFunction 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(BooleanToDoubleFunction function, R target)
MutableDoubleCollection
with the results of applying the specified function on each element
of the source collection.boolean detectIfNone(BooleanPredicate predicate, boolean ifNone)
int count(BooleanPredicate predicate)
boolean anySatisfy(BooleanPredicate predicate)
boolean allSatisfy(BooleanPredicate predicate)
boolean noneSatisfy(BooleanPredicate predicate)
MutableBooleanList toList()
MutableBooleanSet toSet()
MutableBooleanBag toBag()
LazyBooleanIterable asLazy()
<T> T injectInto(T injectedValue, ObjectBooleanToObjectFunction<? super T,? extends T> function)
default boolean reduceIfEmpty(BooleanBooleanToBooleanFunction accumulator, boolean defaultValue)
reduce(BooleanBooleanToBooleanFunction)
default boolean reduce(BooleanBooleanToBooleanFunction accumulator)
RichIterable.reduce(BinaryOperator)
default RichIterable<BooleanIterable> chunk(int size)
size
- the number of elements per chunkRichIterable
containing BooleanIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.Copyright © 2004–2020. All rights reserved.