Class LazyCollection.FilterIterator
java.lang.Object
org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<E>
LazyCollection<E>.org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
org.eclipse.m2m.atl.emftvm.util.LazyCollection.FilterIterator
- All Implemented Interfaces:
Iterator<E>
- Direct Known Subclasses:
LazyCollection.RejectIterator, LazyCollection.SelectIterator
- Enclosing class:
LazyCollection<E>
LazyCollection.ReadOnlyIterator that filters elements from the underlying
collection by evaluating a condition function on them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CodeBlockprotected Eprotected booleanprotected booleanprotected final StackFrameFields inherited from class LazyCollection.CachingIterator
i, inner -
Constructor Summary
ConstructorsConstructorDescriptionFilterIterator(CodeBlock condition, StackFrame parentFrame) Creates aLazyCollection<E>.FilterIteratorwithcondition. -
Method Summary
Methods inherited from class LazyCollection.CachingIterator
updateCacheMethods inherited from class LazyCollection.ReadOnlyIterator
removeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
condition
-
parentFrame
-
next
-
nextSet
protected boolean nextSet -
nextIncluded
protected boolean nextIncluded
-
-
Constructor Details
-
FilterIterator
Creates aLazyCollection<E>.FilterIteratorwithcondition.- Parameters:
condition- the condition functionparentFrame- the parent stack frame context
-
-
Method Details
-
include
Checks whether to includeelement
.- Parameters:
element- the element to filter- Returns:
trueiffelementshould be included in this collection
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<E>- Overrides:
hasNextin classLazyCollection<E>.CachingIterator
-
next
- Specified by:
nextin interfaceIterator<E>- Overrides:
nextin classLazyCollection<E>.CachingIterator
-