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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCollectBooleanIterable.BooleanFunctionToProcedure<T>
-
Field Summary
Fields Modifier and Type Field Description private CollectBooleanIterable.BooleanFunctionToProcedure<T>booleanFunctionToProcedureprivate BooleanFunction<? super T>functionprivate LazyIterable<T>iterable
-
Constructor Summary
Constructors Constructor Description CollectBooleanIterable(LazyIterable<T> adapted, BooleanFunction<? super T> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(BooleanPredicate predicate)Returns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(BooleanPredicate predicate)Returns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.BooleanIteratorbooleanIterator()Returns a primitive iterator that can be used to iterate over the BooleanIterable in an imperative style.booleancontainsAll(boolean... source)Returns true if all of the values specified in the source array are contained in the BooleanIterable, and false if they are not.booleancontainsAll(BooleanIterable source)Returns true if all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.intcount(BooleanPredicate predicate)Returns a count of the number of elements in the BooleanIterable that return true for the specified predicate.voideach(BooleanProcedure procedure)A synonym for forEach.voidforEach(BooleanProcedure procedure)Applies the BooleanProcedure to each element in the BooleanIterable.booleanisEmpty()Returns true if this iterable has zero items.booleannoneSatisfy(BooleanPredicate predicate)Returns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.booleannotEmpty()The English equivalent of !this.isEmpty()intsize()Returns the number of items in this iterable.boolean[]toArray()Converts the BooleanIterable to a primitive boolean array.MutableBooleanBagtoBag()Converts the BooleanIterable to a new MutableBooleanBag.MutableBooleanListtoList()Converts the BooleanIterable to a new MutableBooleanList.MutableBooleanSettoSet()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
clone, equals, finalize, 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, containsAny, containsAny, containsNone, containsNone, flatCollect, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, reduce, reduceIfEmpty, reject, select, toArray
-
-
-
-
Field Detail
-
iterable
private final LazyIterable<T> iterable
-
function
private final BooleanFunction<? super T> function
-
booleanFunctionToProcedure
private final CollectBooleanIterable.BooleanFunctionToProcedure<T> booleanFunctionToProcedure
-
-
Constructor Detail
-
CollectBooleanIterable
public CollectBooleanIterable(LazyIterable<T> adapted, BooleanFunction<? super T> function)
-
-
Method Detail
-
booleanIterator
public BooleanIterator booleanIterator()
Description copied from interface:BooleanIterableReturns a primitive iterator that can be used to iterate over the BooleanIterable in an imperative style.
-
forEach
public void forEach(BooleanProcedure procedure)
Description copied from interface:BooleanIterableApplies the BooleanProcedure to each element in the BooleanIterable.
-
each
public void each(BooleanProcedure procedure)
Description copied from interface:BooleanIterableA synonym for forEach.- Since:
- 7.0.
-
size
public int size()
Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable- Overrides:
sizein classAbstractLazyBooleanIterable
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable- Overrides:
isEmptyin classAbstractLazyBooleanIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable- Overrides:
notEmptyin classAbstractLazyBooleanIterable
-
count
public int count(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns a count of the number of elements in the BooleanIterable that return true for the specified predicate.- Specified by:
countin interfaceBooleanIterable- Overrides:
countin classAbstractLazyBooleanIterable
-
anySatisfy
public boolean anySatisfy(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns true if any of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceBooleanIterable- Overrides:
anySatisfyin classAbstractLazyBooleanIterable
-
allSatisfy
public boolean allSatisfy(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns true if all of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceBooleanIterable- Overrides:
allSatisfyin classAbstractLazyBooleanIterable
-
noneSatisfy
public boolean noneSatisfy(BooleanPredicate predicate)
Description copied from interface:BooleanIterableReturns true if none of the elements in the BooleanIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfyin interfaceBooleanIterable- Overrides:
noneSatisfyin classAbstractLazyBooleanIterable
-
toArray
public boolean[] toArray()
Description copied from interface:BooleanIterableConverts the BooleanIterable to a primitive boolean array.- Specified by:
toArrayin interfaceBooleanIterable- Overrides:
toArrayin classAbstractLazyBooleanIterable
-
toList
public MutableBooleanList toList()
Description copied from interface:BooleanIterableConverts the BooleanIterable to a new MutableBooleanList.- Specified by:
toListin interfaceBooleanIterable- Overrides:
toListin classAbstractLazyBooleanIterable
-
toSet
public MutableBooleanSet toSet()
Description copied from interface:BooleanIterableConverts the BooleanIterable to a new MutableBooleanSet.- Specified by:
toSetin interfaceBooleanIterable- Overrides:
toSetin classAbstractLazyBooleanIterable
-
toBag
public MutableBooleanBag toBag()
Description copied from interface:BooleanIterableConverts the BooleanIterable to a new MutableBooleanBag.- Specified by:
toBagin interfaceBooleanIterable- Overrides:
toBagin classAbstractLazyBooleanIterable
-
containsAll
public boolean containsAll(boolean... source)
Description copied from interface:BooleanIterableReturns true if all of the values specified in the source array are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAllin interfaceBooleanIterable- Overrides:
containsAllin classAbstractLazyBooleanIterable
-
containsAll
public boolean containsAll(BooleanIterable source)
Description copied from interface:BooleanIterableReturns true if all of the values specified in the source BooleanIterable are contained in the BooleanIterable, and false if they are not.- Specified by:
containsAllin interfaceBooleanIterable- Overrides:
containsAllin classAbstractLazyBooleanIterable
-
-