eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class LongCounter

java.lang.Object
  |
  +--mss.ea.stat.LongCounter
All Implemented Interfaces:
Counter

public class LongCounter
extends java.lang.Object
implements Counter

Long counter.

Since:
0.1
Version:
0.1 (03-09-2001)
Author:
Andreas Rummler

Field Summary
protected  long value
          Counter value.
 
Constructor Summary
LongCounter()
          Constructor.
 
Method Summary
 void dec()
          Decrements the counter by 1.
 void dec(long amount)
          Decrements the counter by the given value.
 void inc()
          Increments the counter by 1.
 void inc(long amount)
          Increments the counter by the given amount.
 long longValue()
          Gets the current value of the counter.
 void reset()
          Resets the counter.
 java.lang.String toString()
          Returns a string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected long value
Counter value.
Constructor Detail

LongCounter

public LongCounter()
Constructor.
Method Detail

dec

public void dec()
Decrements the counter by 1.
Specified by:
dec in interface Counter

dec

public void dec(long amount)
Decrements the counter by the given value.
Parameters:
amount - decrement

inc

public void inc()
Increments the counter by 1.
Specified by:
inc in interface Counter

inc

public void inc(long amount)
Increments the counter by the given amount.
Parameters:
amount - increment

reset

public void reset()
Resets the counter.
Specified by:
reset in interface Counter

longValue

public long longValue()
Gets the current value of the counter.
Specified by:
longValue in interface Counter
Returns:
current value

toString

public java.lang.String toString()
Returns a string representation.
Overrides:
toString in class java.lang.Object
Returns:
string representation

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS