diff options
Diffstat (limited to 'base/src/main/java/bjc/utils/data/GeneratingIterator.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/GeneratingIterator.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/base/src/main/java/bjc/utils/data/GeneratingIterator.java b/base/src/main/java/bjc/utils/data/GeneratingIterator.java index 92d10a5..8e6bcd2 100644 --- a/base/src/main/java/bjc/utils/data/GeneratingIterator.java +++ b/base/src/main/java/bjc/utils/data/GeneratingIterator.java @@ -10,7 +10,7 @@ import java.util.function.UnaryOperator; * @author bjculkin * * @param <E> - * The type of element generated. + * The type of element generated. */ public class GeneratingIterator<E> implements Iterator<E> { /* Our current state. */ @@ -24,14 +24,14 @@ public class GeneratingIterator<E> implements Iterator<E> { * Create a new generative iterator. * * @param initial - * The initial state of the generator. + * The initial state of the generator. * * @param transition - * The function to apply to the state. + * The function to apply to the state. * * @param stopper - * The predicate applied to the current state to - * determine when to stop. + * The predicate applied to the current state to determine when + * to stop. */ public GeneratingIterator(E initial, UnaryOperator<E> transition, Predicate<E> stopper) { state = initial; @@ -45,10 +45,9 @@ public class GeneratingIterator<E> implements Iterator<E> { } /* - * @NOTE - * As this currently is, it only works correctly assuming that - * next() is only called when hasNext() is true. Should we - * safeguard against people who are not doing the right thing? + * @NOTE As this currently is, it only works correctly assuming that + * next() is only called when hasNext() is true. Should we safeguard + * against people who are not doing the right thing? */ @Override public E next() { |
