net.spy.stat
Class CounterStat

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.stat.Stat
          extended by net.spy.stat.CounterStat

public class CounterStat
extends Stat

Simple counter stat.


Constructor Summary
CounterStat()
          Get an instance of CounterStat.
 
Method Summary
 long getCount()
          Get the current count for this counter.
 java.lang.String getStat()
          Get the count as a string.
 void increment()
          Increment the counter.
 void increment(long howmuch)
          Increment the counter a specific amount.
 void setValue(long to)
          Set the absolute value of this counter.
 
Methods inherited from class net.spy.stat.Stat
getName, setName, toString
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CounterStat

public CounterStat()
Get an instance of CounterStat.

Method Detail

increment

public void increment()
Increment the counter.


increment

public void increment(long howmuch)
Increment the counter a specific amount.

Parameters:
howmuch - how much to increment the counter

getCount

public long getCount()
Get the current count for this counter.


getStat

public java.lang.String getStat()
Get the count as a string.

Specified by:
getStat in class Stat

setValue

public void setValue(long to)
Set the absolute value of this counter.



Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.