Changed IdGenerator constructor to accept size instead of end index

This commit is contained in:
Kai S. K. Engelbart 2020-01-28 17:09:28 +01:00
parent 09b803ed4b
commit dd3f920e94

View File

@ -23,12 +23,12 @@ public class IdGenerator implements Serializable {
* Creates an instance of {@link IdGenerator}.
*
* @param begin the first ID
* @param end the last ID
* @param size the amount of IDs to provide
* @since Envoy Common v0.2-alpha
*/
public IdGenerator(long begin, long end) {
current = begin;
this.end = end;
public IdGenerator(long begin, long size) {
current = begin;
end = begin + size;
}
@Override