com.acsinet_solutions.util
Class SimpleCounter

java.lang.Object
  extended by com.acsinet_solutions.util.SimpleCounter

public class SimpleCounter
extends java.lang.Object

Simple counter implementation

Author:
Santiago Arriaga

Constructor Summary
SimpleCounter()
          Public constructor that initializes count at 0.
SimpleCounter(long count)
          Public constructor that initializes count at an specified value
 
Method Summary
 long getCount()
          Get the current count
 long next()
          Increments the count and returns the next value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCounter

public SimpleCounter()
Public constructor that initializes count at 0. The next value will be 1


SimpleCounter

public SimpleCounter(long count)
Public constructor that initializes count at an specified value

Method Detail

next

public long next()
Increments the count and returns the next value


getCount

public long getCount()
Get the current count