Class RejectIterable<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.lazy.AbstractLazyIterable<T>
-
- org.eclipse.collections.impl.lazy.RejectIterable<T>
-
- All Implemented Interfaces:
Iterable<T>
,InternalIterable<T>
,LazyIterable<T>
,RichIterable<T>
public class RejectIterable<T> extends AbstractLazyIterable<T>
A RejectIterable is an iterable that filters a source iterable on a negative condition as it iterates.
-
-
Constructor Summary
Constructors Constructor Description RejectIterable(Iterable<T> newAdapted, Predicate<? super T> newPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(Predicate<? super T> predicate)
boolean
anySatisfy(Predicate<? super T> predicate)
T
detect(Predicate<? super T> predicate)
Optional<T>
detectOptional(Predicate<? super T> predicate)
void
each(Procedure<? super T> procedure)
<P> void
forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
void
forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
T
getFirst()
Iterator<T>
iterator()
We use a SelectIterator, since we have already negated the predicateboolean
noneSatisfy(Predicate<? super T> predicate)
-
Methods inherited from class org.eclipse.collections.impl.lazy.AbstractLazyIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, concatenate, distinct, drop, dropWhile, flatCollect, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, into, isEmpty, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, take, takeWhile, tap, toArray, toStack, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfyWith, anySatisfyWith, appendString, appendString, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countByEach, countWith, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, max, max, maxBy, min, min, minBy, noneSatisfyWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface java.lang.Iterable
spliterator
-
Methods inherited from interface org.eclipse.collections.api.LazyIterable
flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateBy, aggregateInPlaceBy, allSatisfyWith, anySatisfyWith, appendString, appendString, appendString, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detectIfNone, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
-
-
-
Method Detail
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndex
in interfaceInternalIterable<T>
- Overrides:
forEachWithIndex
in classAbstractRichIterable<T>
-
forEachWith
public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
- Specified by:
forEachWith
in interfaceInternalIterable<T>
- Overrides:
forEachWith
in classAbstractRichIterable<T>
-
iterator
public Iterator<T> iterator()
We use a SelectIterator, since we have already negated the predicate
-
anySatisfy
public boolean anySatisfy(Predicate<? super T> predicate)
- Specified by:
anySatisfy
in interfaceRichIterable<T>
- Overrides:
anySatisfy
in classAbstractRichIterable<T>
-
allSatisfy
public boolean allSatisfy(Predicate<? super T> predicate)
- Specified by:
allSatisfy
in interfaceRichIterable<T>
- Overrides:
allSatisfy
in classAbstractRichIterable<T>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super T> predicate)
- Specified by:
noneSatisfy
in interfaceRichIterable<T>
- Overrides:
noneSatisfy
in classAbstractRichIterable<T>
-
detect
public T detect(Predicate<? super T> predicate)
- Specified by:
detect
in interfaceRichIterable<T>
- Overrides:
detect
in classAbstractRichIterable<T>
-
detectOptional
public Optional<T> detectOptional(Predicate<? super T> predicate)
- Specified by:
detectOptional
in interfaceRichIterable<T>
- Overrides:
detectOptional
in classAbstractRichIterable<T>
-
getFirst
public T getFirst()
- Specified by:
getFirst
in interfaceLazyIterable<T>
- Specified by:
getFirst
in interfaceRichIterable<T>
- Overrides:
getFirst
in classAbstractLazyIterable<T>
-
-