

/*
 *  Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
*/
package com.sun.bookstore1.util;

public class Counter {
    private int counter;

    public Counter() {
        counter = 0;
    }

    public synchronized int getCounter() {
        return counter;
    }

    public synchronized int setCounter(int c) {
        counter = c;

        return counter;
    }

    public synchronized int incCounter() {
        return (++counter);
    }
}
