Class CollectBooleanIterable<T>
java.lang.Object
org.eclipse.collections.impl.lazy.primitive.AbstractLazyBooleanIterable
org.eclipse.collections.impl.lazy.primitive.CollectBooleanIterable<T>
- All Implemented Interfaces:
BooleanIterable
,LazyBooleanIterable
,PrimitiveIterable
public class CollectBooleanIterable<T> extends AbstractLazyBooleanIterable
A CollectIntIterable is an iterable that transforms a source iterable using an IntFunction as it iterates.
-
Constructor Summary
Constructors Constructor Description CollectBooleanIterable(LazyIterable<T> adapted, BooleanFunction<? super T> function)
-
Method Summary
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.BooleanIterator
booleanIterator()
Returns a primitive iterator that can be used to iterate over the BooleanIterable in an imperative style.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.void
each(BooleanProcedure procedure)
A synonym for forEach.void
forEach(BooleanProcedure procedure)
Applies the BooleanProcedure to each element in the BooleanIterable.boolean
isEmpty()
Returns true if this iterable has zero items.boolean
noneSatisfy(BooleanPredicate predicate)
Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.boolean
notEmpty()
The English equivalent of !this.isEmpty()int
size()
Returns the number of items in this iterable.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.Methods inherited from class org.eclipse.collections.impl.lazy.primitive.AbstractLazyBooleanIterable
appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, detectIfNone, flatCollect, injectInto, makeString, makeString, makeString, reject, select, tap, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.BooleanIterable
collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, reduce, reduceIfEmpty, reject, select, toArray
-
Constructor Details
-
Method Details
-
booleanIterator
Description copied from interface:BooleanIterable
Returns a primitive iterator that can be used to iterate over the BooleanIterable in an imperative style. -
forEach
Description copied from interface:BooleanIterable
Applies the BooleanProcedure to each element in the BooleanIterable.- Specified by:
forEach
in interfaceBooleanIterable
- Overrides:
forEach
in classAbstractLazyBooleanIterable
-
each
Description copied from interface:BooleanIterable
A synonym for forEach.- Since:
- 7.0.
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
- Overrides:
size
in classAbstractLazyBooleanIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
- Overrides:
isEmpty
in classAbstractLazyBooleanIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
- Overrides:
notEmpty
in classAbstractLazyBooleanIterable
-
count
Description copied from interface:BooleanIterable
Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.- Specified by:
count
in interfaceBooleanIterable
- Overrides:
count
in classAbstractLazyBooleanIterable
-
anySatisfy
Description copied from interface:BooleanIterable
Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceBooleanIterable
- Overrides:
anySatisfy
in classAbstractLazyBooleanIterable
-
allSatisfy
Description copied from interface:BooleanIterable
Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceBooleanIterable
- Overrides:
allSatisfy
in classAbstractLazyBooleanIterable
-
noneSatisfy
Description copied from interface:BooleanIterable
Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceBooleanIterable
- Overrides:
noneSatisfy
in classAbstractLazyBooleanIterable
-
toArray
public boolean[] toArray()Description copied from interface:BooleanIterable
Converts the BooleanIterable to a primitive boolean array.- Specified by:
toArray
in interfaceBooleanIterable
- Overrides:
toArray
in classAbstractLazyBooleanIterable
-
toList
Description copied from interface:BooleanIterable
Converts the BooleanIterable to a new MutableBooleanList.- Specified by:
toList
in interfaceBooleanIterable
- Overrides:
toList
in classAbstractLazyBooleanIterable
-
toSet
Description copied from interface:BooleanIterable
Converts the BooleanIterable to a new MutableBooleanSet.- Specified by:
toSet
in interfaceBooleanIterable
- Overrides:
toSet
in classAbstractLazyBooleanIterable
-
toBag
Description copied from interface:BooleanIterable
Converts the BooleanIterable to a new MutableBooleanBag.- Specified by:
toBag
in interfaceBooleanIterable
- Overrides:
toBag
in classAbstractLazyBooleanIterable
-
containsAll
public boolean containsAll(boolean... source)Description copied from interface:BooleanIterable
Returns true if the all of the values specified in the source array are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAll
in interfaceBooleanIterable
- Overrides:
containsAll
in classAbstractLazyBooleanIterable
-
containsAll
Description copied from interface:BooleanIterable
Returns true if the all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAll
in interfaceBooleanIterable
- Overrides:
containsAll
in classAbstractLazyBooleanIterable
-