Added IdProvider
This commit is contained in:
parent
0d99ee219d
commit
a29f8c7db7
|
@ -0,0 +1,11 @@
|
|||
package ch.zhaw.gartenverwaltung.io;
|
||||
|
||||
public class IdProvider {
|
||||
private long currentId;
|
||||
public IdProvider(long initialValue) {
|
||||
currentId = initialValue;
|
||||
}
|
||||
public long incrementAndGet() {
|
||||
return ++currentId;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue