kiwi.util
Class Counter

java.lang.Object
  extended bykiwi.util.HolderObject
      extended bykiwi.util.IntegerHolder
          extended bykiwi.util.Counter

public class Counter
extends IntegerHolder

An integer counter object.

Author:
Mark Lindner, PING Software Group

Field Summary
 
Fields inherited from class kiwi.util.IntegerHolder
value
 
Fields inherited from class kiwi.util.HolderObject
subtype
 
Constructor Summary
Counter()
          Construct a new Counter with an initial value of 0.
Counter(int value)
          Construct a new Counter with a specified initial value.
 
Method Summary
 void decrement()
          Decrement the counter by 1.
 void increment()
          Increment the counter by 1.
 
Methods inherited from class kiwi.util.IntegerHolder
compareTo, getValue, setValue, toString
 
Methods inherited from class kiwi.util.HolderObject
getSubtype, setSubtype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Counter

public Counter(int value)
Construct a new Counter with a specified initial value.

Parameters:
value - The initial value.

Counter

public Counter()
Construct a new Counter with an initial value of 0.

Method Detail

increment

public final void increment()
Increment the counter by 1.


decrement

public final void decrement()
Decrement the counter by 1.