Package org.eclipse.m2m.atl.emftvm.util
Class 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 org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
i, inner -
Constructor Summary
ConstructorsConstructorDescriptionFilterIterator(CodeBlock condition, StackFrame parentFrame) Creates aLazyCollection<E>.FilterIteratorwithcondition. -
Method Summary
Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
updateCacheMethods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.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
-