Changed IdGenerator constructor to accept size instead of end index
This commit is contained in:
parent
09b803ed4b
commit
dd3f920e94
@ -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