java.lang.Object | ||
↳ | org.apache.commons.betwixt.io.id.AbstractIDGenerator | |
↳ | org.apache.commons.betwixt.io.id.SequentialIDGenerator |
Generates ID
's in numeric sequence.
A simple counter is used.
Every time that nextIdImpl()
is called,
this counter is incremented.
By default, the counter starts at zero.
A user can set the initial value by using the
SequentialIDGenerator(int)
constructor.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Base constructor.
| |||||||||||
Constructor sets the start value for the counter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the current counter value
| |||||||||||
Increment counter and then return value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.commons.betwixt.io.id.AbstractIDGenerator
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.commons.betwixt.io.IDGenerator
|
Base constructor. Counter starts at zero.
Constructor sets the start value for the counter.
Note since the counter increments
before returning the next value,
first ID
generated will be one more
than the given start
parameter.
start | start the counting at this value |
---|
Gets the current counter value
Increment counter and then return value.