public final class IntSequenceGenerator
extends java.lang.Object
implements java.lang.Iterable<java.lang.Integer>
Iterable of sequential integers.
Note, this Iterable stops iterating when the iterated value would leave the integer range.
| Constructor and Description |
|---|
IntSequenceGenerator()
Creates a sequence of
Integer starting at 0 with a step size of 1. |
IntSequenceGenerator(int start)
Creates a sequence of
Integer starting at the give value with a step size of 1. |
IntSequenceGenerator(int start,
int step)
Creates a sequence of
Integer starting at the give value with the given step size. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<java.lang.Integer> |
iterator() |
public IntSequenceGenerator()
Integer starting at 0 with a step size of 1.public IntSequenceGenerator(int start)
Integer starting at the give value with a step size of 1.public IntSequenceGenerator(int start,
int step)
Integer starting at the give value with the given step size.