Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

juju.reattore.util
Class BaseStat  view BaseStat download BaseStat.java

java.lang.Object
  extended byjuju.reattore.util.BaseStat
All Implemented Interfaces:
Stat
Direct Known Subclasses:
CounterStat, DurationStat, GaugeStat, RateStat

public abstract class BaseStat
extends java.lang.Object
implements Stat

Base implementation of a statistic module.


Field Summary
private  java.lang.String fmt
           
private  java.lang.String name
           
 
Constructor Summary
BaseStat(java.lang.Class clazz, java.lang.String leaf)
          Create a new statistic for the given class and leaf name.
 
Method Summary
 java.lang.String format()
          Summarise this statistic as a string.
protected abstract  java.lang.String getDefaultFormat()
          Returns the default format string to use.
protected abstract  java.lang.Object[] getFormatArgs()
          Returns the argument list used in formatting the summary.
 java.lang.String getName()
          Returns the fully qualified name of this stat.
 void setFormat(java.lang.String fmt)
          Sets the format used in summarising this stat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fmt

private java.lang.String fmt

name

private java.lang.String name
Constructor Detail

BaseStat

public BaseStat(java.lang.Class clazz,
                java.lang.String leaf)
Create a new statistic for the given class and leaf name.

Method Detail

getDefaultFormat

protected abstract java.lang.String getDefaultFormat()
Returns the default format string to use.


getFormatArgs

protected abstract java.lang.Object[] getFormatArgs()
Returns the argument list used in formatting the summary.


getName

public java.lang.String getName()
Returns the fully qualified name of this stat.

Specified by:
getName in interface Stat

setFormat

public void setFormat(java.lang.String fmt)
Sets the format used in summarising this stat.

Specified by:
setFormat in interface Stat

format

public java.lang.String format()
Summarise this statistic as a string.

Specified by:
format in interface Stat