package com.its.vds.domain;

public class VdsFrameSequence {
    private Short seq = 1;

    public VdsFrameSequence() {
        this.seq = 10;
    }

    public VdsFrameSequence(short num) {
        this.seq = num;
    }

    public short nextValue() {
        synchronized (this.seq) {
            if (this.seq == Short.MAX_VALUE) {
                this.seq = 10;
            } else {
                this.seq = (short) (this.seq + 1);
            }
        }
        return this.seq;
    }

    public short currentValue() {
        return this.seq;
    }

    public void resetValue() {
        this.seq = 10;
    }
}
