public interface Trampoline<T>
computeResult() method required to perform the iteration, but the
client code can be fully immutable as a result.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Trampoline.CompletedTrampoline<T> |
static interface |
Trampoline.IntermediateTrampoline<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> Trampoline<T> |
complete(Trampoline.CompletedTrampoline<T> completedTrampoline) |
default T |
computeResult() |
boolean |
hasNext() |
static <T> Trampoline<T> |
intermediate(Trampoline.IntermediateTrampoline<T> intermediateTrampoline) |
Trampoline<T> |
next() |
T |
result() |
T result()
boolean hasNext()
Trampoline<T> next()
default T computeResult()
static <T> Trampoline<T> complete(Trampoline.CompletedTrampoline<T> completedTrampoline)
static <T> Trampoline<T> intermediate(Trampoline.IntermediateTrampoline<T> intermediateTrampoline)
Copyright © 2017. All rights reserved.