| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| SequenceSupplier | 8 | 1 | 0% | 1 | 2 |
| 1 | package guru.mikelue.foxglove.functional; | |
| 2 | ||
| 3 | /** | |
| 4 | * Supplies consequent number with customizable start and steps. | |
| 5 | * | |
| 6 | * @param <T> The type of number | |
| 7 | */ | |
| 8 | public interface SequenceSupplier<T extends Number> extends StatefulSupplier<T> { | |
| 9 | /** | |
| 10 | * Gets the next value in sequence. | |
| 11 | * | |
| 12 | * @return The next value | |
| 13 | * | |
| 14 | * @see #nextValue() | |
| 15 | */ | |
| 16 | 0 | default T get() |
| 17 | { | |
| 18 | 0 | return nextValue(); |
| 19 | } | |
| 20 | ||
| 21 | /** | |
| 22 | * Gets the next value in sequence. | |
| 23 | * | |
| 24 | * @return The next value | |
| 25 | */ | |
| 26 | T nextValue(); | |
| 27 | ||
| 28 | /** | |
| 29 | * Gets the next value in sequence(without stepping). | |
| 30 | * | |
| 31 | * @return The current value | |
| 32 | */ | |
| 33 | T lastValue(); | |
| 34 | } |