public class IntegerIndexSequence extends BaseFieldGenerator<Integer>
Integer.| Constructor and Description |
|---|
IntegerIndexSequence()
Build a sequence that will return values from 0 with an increment of 1.
|
IntegerIndexSequence(Integer start)
Build a sequence that will return values from
start with an increment of 1. |
| Modifier and Type | Method and Description |
|---|---|
Integer |
current()
Returns the next sequence value.
|
boolean |
hasNext()
Always returns false.
|
Integer |
next()
Returns the next generated value.
|
void |
reset()
Does nothing.
|
String |
toString() |
removepublic IntegerIndexSequence(Integer start)
start with an increment of 1.
s = new IntegerIndexSequence(1);
s will generate the following numbers: 1, 2, 3, 4, ...start - first value in sequence, inclusive.public IntegerIndexSequence()
s = new IntegerIndexSequence();
s will generate the following numbers: 0, 1, 2, 3, ...public void reset()
public Integer current()
public boolean hasNext()
false.public Integer next()
Copyright © 2014. All Rights Reserved.