Added IdProvider

This commit is contained in:
David Guler 2022-10-24 13:42:31 +02:00
parent 0d99ee219d
commit a29f8c7db7
1 changed files with 11 additions and 0 deletions

View File

@ -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;
}
}