org.sapia.ubik.rmi.server.perf
Class StatValue

java.lang.Object
  extended by org.sapia.ubik.rmi.server.perf.StatValue

public class StatValue
extends java.lang.Object

Encapsulates logic pertaining to manipulation of a statistic value.

Author:
yduchesne

Constructor Summary
StatValue()
           
 
Method Summary
 double avg(int count)
          Calculates an average, based on the given count (this instance's value divided by the count).
 double get()
           
 void incrementDouble(double val)
           
 void incrementInt(int val)
           
 void incrementLong(long val)
          Increments this instance's current value by the given increment.
 void set(double val)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatValue

public StatValue()
Method Detail

avg

public double avg(int count)
Calculates an average, based on the given count (this instance's value divided by the count).

Parameters:
count - a count.
Returns:
the average.

get

public double get()
Returns:
this instance's current value.

set

public void set(double val)
Parameters:
val - the value to set as this instance's current one.

incrementLong

public void incrementLong(long val)
Increments this instance's current value by the given increment.

Parameters:
val - an increment.

incrementInt

public void incrementInt(int val)
See Also:
incrementLong(long)

incrementDouble

public void incrementDouble(double val)
See Also:
incrementLong(long)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Sapia OSS. All Rights Reserved.