diff options
| author | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
|---|---|---|
| committer | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
| commit | df94066e3af02ff02d5ab4d033a3d603f743234c (patch) | |
| tree | 168a1edaf58d386c175ffb601e9d4da8e13d31e2 /base/src/main/java/bjc/utils/data/GeneratingIterator.java | |
| parent | ae51c587c53f7ca311e556e3cbd0c5566d6c2843 (diff) | |
Formatting pass
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() { |
