package ch.zhaw.gartenverwaltung.io;

/**
 * Provides an sequential ID starting from the given initial Value.
 */
public class IdProvider {
    private long currentId;
    public IdProvider(long initialValue) {
        currentId = initialValue;
    }

    /**
     * Yields the next ID in the sequence.
     * @return The next ID
     */
    public long incrementAndGet() {
        return ++currentId;
    }
}
