com.jeantessier.metrics
Class MeasurementBase
java.lang.Object
|
+--com.jeantessier.metrics.MeasurementBase
- All Implemented Interfaces:
- Measurement
- Direct Known Subclasses:
- AccumulatorMeasurement, CounterMeasurement, NameListMeasurement, NbSubMetricsMeasurement, RatioMeasurement, StatisticalMeasurement, SumMeasurement
- public abstract class MeasurementBase
- extends java.lang.Object
- implements Measurement
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MeasurementBase
public MeasurementBase(MeasurementDescriptor descriptor,
Metrics context,
java.lang.String initText)
perl
protected static org.apache.oro.text.perl.Perl5Util perl()
getDescriptor
public MeasurementDescriptor getDescriptor()
- Specified by:
getDescriptor
in interface Measurement
getContext
public Metrics getContext()
- Specified by:
getContext
in interface Measurement
isCached
protected boolean isCached()
- Tells this instance if it should reuse a previously
computed value or if it should regenerate it.
setCached
protected void setCached(boolean cached)
- Sets the caching flag, telling this instance if
its value has been computed. This flag is
conditional to caching being enabled in the
corresponding descriptor.
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Measurement
setEmpty
protected void setEmpty(boolean empty)
getShortName
public java.lang.String getShortName()
- Specified by:
getShortName
in interface Measurement
getLongName
public java.lang.String getLongName()
- Specified by:
getLongName
in interface Measurement
getValue
public java.lang.Number getValue()
- Specified by:
getValue
in interface Measurement
intValue
public int intValue()
- Specified by:
intValue
in interface Measurement
longValue
public long longValue()
- Specified by:
longValue
in interface Measurement
floatValue
public float floatValue()
- Specified by:
floatValue
in interface Measurement
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in interface Measurement
isInRange
public boolean isInRange()
- Specified by:
isInRange
in interface Measurement
add
public void add(java.lang.Object object)
- Specified by:
add
in interface Measurement
add
public void add(int i)
- Specified by:
add
in interface Measurement
add
public void add(long l)
- Specified by:
add
in interface Measurement
add
public void add(float f)
- Specified by:
add
in interface Measurement
add
public void add(double d)
- Specified by:
add
in interface Measurement
compute
protected abstract double compute()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.