Interface ValueIteration<R>
- All Superinterfaces:
VoidIteration
- All Known Implementing Classes:
IteratorInstance
-
Field Summary
Fields inherited from interface com.vladsch.flexmark.tree.iteration.VoidIteration
NULL
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
Set result value and terminate all recursionsvoid
Set the result which will be returned by the loop if terminated withoutReturn(Object)
call.Methods inherited from interface com.vladsch.flexmark.tree.iteration.VoidIteration
doBreak, doBreak, doComplete, doContinue, doContinue, doReturn, getAcceptCount, getData, getHaveAcceptableNext, getHaveNext, getLoopCount, getRecursionLevel, getTotalAcceptCount, getTotalLoopCount, ifIncomplete, isComplete, isIncomplete, isTerminated
-
Method Details
-
setResult
Set the result which will be returned by the loop if terminated withoutReturn(Object)
call.- Parameters:
value
- value to return from the loop
-
isDefaultResult
boolean isDefaultResult()- Returns:
- true if the current loop result value was never set (ie. only set at loop instantiation with
defaultValue)
NOTE: does not test current value with equality to default value, set by
setResult(Object)
orReturn(Object)
-
getDefaultValue
- Returns:
- defaultValue passed to loop instance
-
getResult
- Returns:
- current result value
-
Return
Set result value and terminate all recursions- Parameters:
value
- value to return for the result of the loop
-