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