aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils/Counter.java
blob: a0bf0fdd30aae26b1eb4069baa36268a09b559df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.jantuomi.interpreter.main.utils;

/**
 * Created by jan on 13.6.2016.
 */
public class Counter {
    private int value = 0;

    public int advance() {
        value = value + 1;
        return value;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public Counter clone() {
        Counter c = new Counter();
        c.value = value;
        return c;
    }
}