Interface ValueIteration<R>
-
- All Superinterfaces:
VoidIteration
- All Known Implementing Classes:
IteratorInstance
public interface ValueIteration<R> extends VoidIteration
-
-
Field Summary
-
Fields inherited from interface com.vladsch.flexmark.tree.iteration.VoidIteration
NULL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RgetDefaultValue()RgetResult()booleanisDefaultResult()voidReturn(R value)Set result value and terminate all recursionsvoidsetResult(R value)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 Detail
-
setResult
void setResult(@NotNull R value)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
@NotNull R getDefaultValue()
- Returns:
- defaultValue passed to loop instance
-
getResult
@NotNull R getResult()
- Returns:
- current result value
-
Return
void Return(@NotNull R value)Set result value and terminate all recursions- Parameters:
value- value to return for the result of the loop
-
-