public interface PrimitiveBooleanIterable
extends java.lang.Iterable<java.lang.Boolean>
for creating one on the fly
Modifier and Type | Field and Description |
---|---|
static PrimitiveBooleanIterable |
EMPTY
Empty iterable of primitive boolean values.
|
static PrimitiveBooleanIterator |
EMPTY_BOOLEAN_ITERATOR
Empty iterator of primitive boolean values.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
and()
Get the truth value resulting from combining all values with logical and.
|
PrimitiveBooleanIterator |
booleanIterator()
Get a primitive boolean iterator.
|
default boolean |
containsBool(boolean value)
Does this boolean iterable contain the given value?
|
default boolean |
containsFalse()
Does this boolean iterable contain any
false values? |
default boolean |
containsTrue()
Does this boolean iterable contain any
true values? |
default void |
forEachBool(BooleanConsumer action)
Invoke the given action with each boolean value in this iterable.
|
default <E extends java.lang.Exception> |
forEachBooleanFragile(FragileBooleanConsumer<E> action)
Deprecated.
use
forEachBoolFragile(FragileBooleanConsumer) instead |
default <E extends java.lang.Exception> |
forEachBoolFragile(FragileBooleanConsumer<E> action)
Invoke the given fragile action with each value in this iterable.
|
default java.util.Iterator<java.lang.Boolean> |
iterator() |
default boolean |
or()
Get the truth value resulting from combining all values with logical or.
|
default boolean |
xor()
Get the truth value resulting from combining all values with logical xor.
|
static final PrimitiveBooleanIterator EMPTY_BOOLEAN_ITERATOR
PrimitiveBooleanIterator.EMPTY
static final PrimitiveBooleanIterable EMPTY
@NotNull PrimitiveBooleanIterator booleanIterator()
@NotNull default java.util.Iterator<java.lang.Boolean> iterator()
iterator
in interface java.lang.Iterable<java.lang.Boolean>
default void forEachBool(@NotNull BooleanConsumer action)
action
- action to be call for each boolean value in sequemce.@Deprecated default <E extends java.lang.Exception> void forEachBooleanFragile(@NotNull FragileBooleanConsumer<E> action) throws E extends java.lang.Exception
forEachBoolFragile(FragileBooleanConsumer)
insteadE
- checked exception thrown by actionaction
- action to be called for each value in sequenceE
- if action
throws itE extends java.lang.Exception
default <E extends java.lang.Exception> void forEachBoolFragile(@NotNull FragileBooleanConsumer<E> action) throws E extends java.lang.Exception
E
- checked exception thrown by actionaction
- action to be called for each value in sequenceE
- if action
throws itE extends java.lang.Exception
default boolean containsBool(boolean value)
value
- value to check fortrue
if the value is contained in this iterable, false
if notdefault boolean containsTrue()
true
values?true
if at least one value in this iterable is true
default boolean containsFalse()
false
values?true
if at least one value in this iterable is false
default boolean or()
true
if this is not empty and at least one value is true
,false
otherwisedefault boolean and()
true
if this is not empty and all values are true
,false
otherwisedefault boolean xor()
false
.false
if empty