eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class IntegerCounter

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

public class IntegerCounter
extends java.lang.Object
implements Counter

Integer counter.

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

Field Summary
protected  int value
          Current value of the counter.
 
Constructor Summary
IntegerCounter()
          Constructor.
 
Method Summary
 void dec()
          Decrements the counter by 1.
 void dec(int amount)
          Decrements the counter by the given amount.
 void inc()
          Increments the counter by 1.
 void inc(int amount)
          Increments the counter by the given amount.
 int intValue()
          Gets the current value of the counter as an integer number.
 long longValue()
          Returns the counter value as a long integer.
 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 int value
Current value of the counter.
Constructor Detail

IntegerCounter

public IntegerCounter()
Constructor.
Method Detail

dec

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

dec

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

inc

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

inc

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

reset

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

intValue

public int intValue()
Gets the current value of the counter as an integer number.
Returns:
current value

longValue

public long longValue()
Returns the counter value as a long integer.
Specified by:
longValue in interface Counter
Returns:
counter value as long integer

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