com.jeantessier.metrics
Class AccumulatorMeasurement

java.lang.Object
  |
  +--com.jeantessier.metrics.MeasurementBase
        |
        +--com.jeantessier.metrics.AccumulatorMeasurement
All Implemented Interfaces:
CollectionMeasurement, Measurement
Direct Known Subclasses:
ContextAccumulatorMeasurement, SubMetricsAccumulatorMeasurement

public abstract class AccumulatorMeasurement
extends MeasurementBase
implements CollectionMeasurement

Base class that accumulates entries, filtering with regular expressions. If no regular expressions are given, matches everything for the given measurement, which must implement the CollectionMeasurement interface. Regular expressions matching using Perl5Util from Jakarta-ORO. This measurement will use Perl5Util.group(1) if not null, otherwise the full string.

This is the syntax for initializing this type of measurement:

  <init>
      measurement name [perl regular expression]
      ...
  </init>
  


Constructor Summary
AccumulatorMeasurement(MeasurementDescriptor descriptor, Metrics context, java.lang.String initText)
           
 
Method Summary
protected  double compute()
           
protected  void filterMetrics(Metrics metrics)
           
 java.lang.Number getValue()
           
 java.util.Collection getValues()
           
 boolean isEmpty()
           
protected abstract  void populateValues()
           
 
Methods inherited from class com.jeantessier.metrics.MeasurementBase
add, add, add, add, add, doubleValue, floatValue, getContext, getDescriptor, getLongName, getShortName, intValue, isCached, isInRange, longValue, perl, setCached, setEmpty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jeantessier.metrics.Measurement
accept, add, add, add, add, add, doubleValue, floatValue, getContext, getDescriptor, getLongName, getShortName, intValue, isInRange, longValue
 

Constructor Detail

AccumulatorMeasurement

public AccumulatorMeasurement(MeasurementDescriptor descriptor,
                              Metrics context,
                              java.lang.String initText)
Method Detail

getValue

public java.lang.Number getValue()
Specified by:
getValue in interface Measurement
Overrides:
getValue in class MeasurementBase

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Measurement
Overrides:
isEmpty in class MeasurementBase

compute

protected double compute()
Overrides:
compute in class MeasurementBase

getValues

public java.util.Collection getValues()
Specified by:
getValues in interface CollectionMeasurement

populateValues

protected abstract void populateValues()

filterMetrics

protected void filterMetrics(Metrics metrics)


Dependency Finder 1.1.0 © 2001-2004 Jean Tessier.