public interface Generator<T>
Iterator with the difference that a generator always has a next
element, hence there is no hasNext() method.
A Generator also serves as an equivalent to Single for mutable values. A Single should not be used with mutable values because mutation of
the value would affect all other uses of the Single because other callers might receive the mutated value. A Generator on the other hand is
expected to return (generate) a new instance on each call if the results are mutable.
| Modifier and Type | Method and Description |
|---|---|
T |
next()
Generates and returns another value.
|
T next()