    001    package ifs.util;
    002
    003    /** Counter.
    004     *
    005     * @author <a href="mailto:muller@ktiml.mff.cuni.cz">Tomáš Müller</a>
    006     * @version 1.0
    007     */
    008    public class Counter {
    009        private long iValue = 0;
    010
    011        /** Set counter */
    012        public void set(long value) { iValue = value; }
    013        /** Returns current value */
    014        public long get() { return iValue; }
    015        /** Increment counter */
    016        public void inc(long value) { iValue += value; }
    017        /** Decrement counter */
    018        public void dec(long value) { iValue -= value; }
    019    }