com.neeve.stats
Class AbstractGauge

java.lang.Object
  extended by com.neeve.stats.AbstractGauge
All Implemented Interfaces:
IStats.Gauge
Direct Known Subclasses:
BooleanGauge, ByteGauge, CharGauge, DoubleGauge, FieldReflectingGauge, FloatGauge, IntGauge, LongGauge, MethodReflectingGauge, ShortGauge, StringGauge

public abstract class AbstractGauge
extends Object
implements IStats.Gauge

Base class for IStats.Gauge stats.

Subclass should override the accesor based on the IStats.Gauge.Type that they implement.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.neeve.stats.IStats.Gauge
IStats.Gauge.Type
 
Method Summary
 void get(StringBuilder builder, NumberFormat format)
          Appends the current value of this IStats.Gauge.
 boolean getBooleanValue()
          Gets the current value for a IStats.Gauge.Type.Boolean Gauge.
 byte getByteValue()
          Gets the current value for a IStats.Gauge.Type.Byte Gauge.
 char getCharValue()
          Gets the current value for a IStats.Gauge.Type.Char Gauge.
 double getDoubleValue()
          Gets the current value for a IStats.Gauge.Type.Double Gauge.
 float getFloatValue()
          Gets the current value for a IStats.Gauge.Type.Float Gauge.
 int getIntValue()
          Gets the current value for a IStats.Gauge.Type.Int Gauge.
 long getLongValue()
          Gets the current value for a IStats.Gauge.Type.Long Gauge.
 String getName()
          Gets statistic name.
 XString getNameAsRaw()
          Gets the stat's name as a XString.
 short getShortValue()
          Gets the current value for a IStats.Gauge.Type.Short Gauge.
 XString getStringValue()
          Gets the current value for a IStats.Gauge.Type.String Gauge.
 IStats.Gauge.Type getType()
          Gets the IStats.Gauge.Type of the IStats.Gauge.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public final IStats.Gauge.Type getType()
Description copied from interface: IStats.Gauge
Gets the IStats.Gauge.Type of the IStats.Gauge.

Specified by:
getType in interface IStats.Gauge
Returns:
Returns the IStats.Gauge.Type of the IStats.Gauge.

getName

public final String getName()
Description copied from interface: IStats.Gauge
Gets statistic name.

Specified by:
getName in interface IStats.Gauge
Returns:
The statistic name

getNameAsRaw

public final XString getNameAsRaw()
Description copied from interface: IStats.Gauge
Gets the stat's name as a XString.

Specified by:
getNameAsRaw in interface IStats.Gauge
Returns:
The statistic name in raw form

getBooleanValue

public boolean getBooleanValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Boolean Gauge.

Specified by:
getBooleanValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Boolean Gauge.

getByteValue

public byte getByteValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Byte Gauge.

Specified by:
getByteValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Byte Gauge.

getCharValue

public char getCharValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Char Gauge.

Specified by:
getCharValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Char Gauge.

getShortValue

public short getShortValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Short Gauge.

Specified by:
getShortValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Short Gauge.

getIntValue

public int getIntValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Int Gauge.

Specified by:
getIntValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Int Gauge.

getLongValue

public long getLongValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Long Gauge.

Specified by:
getLongValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Long Gauge.

getFloatValue

public float getFloatValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Float Gauge.

Specified by:
getFloatValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Float Gauge.

getDoubleValue

public double getDoubleValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.Double Gauge.

Specified by:
getDoubleValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.Double Gauge.

getStringValue

public XString getStringValue()
Description copied from interface: IStats.Gauge
Gets the current value for a IStats.Gauge.Type.String Gauge.

Specified by:
getStringValue in interface IStats.Gauge
Returns:
The current value for a IStats.Gauge.Type.String Gauge.

get

public void get(StringBuilder builder,
                NumberFormat format)
Description copied from interface: IStats.Gauge
Appends the current value of this IStats.Gauge. to the provided StringBuilder.

Specified by:
get in interface IStats.Gauge
Parameters:
builder - The builder to which to append the gauge value results.
format - The number format to use for numeric formats.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.