Class EvaluatingIterator<T>
java.lang.Object
com.github.basking2.sdsai.itrex.iterators.EvaluatingIterator<T>
- All Implemented Interfaces:
Iterator<T>
-
Constructor Summary
ConstructorDescriptionEvaluatingIterator
(Evaluator evaluator, EvaluationContext evaluationContext, Iterator<Object> itr) -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
next()
next
(EvaluationContext evaluationContext) void
setEvaluationEnabled
(boolean evaluationEnabled) Set whether this iterator should map objects through its evaluator or not.void
skip()
Advance the iterator without evaluating it.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
EvaluatingIterator
public EvaluatingIterator(Evaluator evaluator, EvaluationContext evaluationContext, Iterator<Object> itr)
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
next
-
setEvaluationEnabled
public void setEvaluationEnabled(boolean evaluationEnabled) Set whether this iterator should map objects through its evaluator or not.- Parameters:
evaluationEnabled
- Enable or disable evlaution using this iterator'sEvaluator
.
-
skip
public void skip()Advance the iterator without evaluating it. This is useful for conditional executions, such is ["if"]. -
getEvaluationContext
-