Changed IdGenerator constructor to accept size instead of end index
This commit is contained in:
parent
40f6d41fff
commit
190b686cc6
@ -23,12 +23,12 @@ public class IdGenerator implements Serializable {
|
|||||||
* Creates an instance of {@link IdGenerator}.
|
* Creates an instance of {@link IdGenerator}.
|
||||||
*
|
*
|
||||||
* @param begin the first ID
|
* @param begin the first ID
|
||||||
* @param end the last ID
|
* @param size the amount of IDs to provide
|
||||||
* @since Envoy Common v0.2-alpha
|
* @since Envoy Common v0.2-alpha
|
||||||
*/
|
*/
|
||||||
public IdGenerator(long begin, long end) {
|
public IdGenerator(long begin, long size) {
|
||||||
current = begin;
|
current = begin;
|
||||||
this.end = end;
|
end = begin + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user