{
private final String key;
- private long counter = 0;
+ private long result = 0;
+
+
+ public KeyCounter(String key, long initialValue)
+ {
+ this.key = key;
+ this.result = initialValue;
+ }
public long increment()
{
- return ++counter;
+ return ++result;
}
}