com.jeantessier.metrics
Class NameListMeasurement

java.lang.Object
  |
  +--com.jeantessier.metrics.MeasurementBase
        |
        +--com.jeantessier.metrics.NameListMeasurement
All Implemented Interfaces:
CollectionMeasurement, Measurement

public class NameListMeasurement
extends MeasurementBase
implements CollectionMeasurement

Accumulates a set of values. Its numerical value is the cardinality (i.e., size) of the set. OOMetrics uses it to keep track of dependencies.

This is the syntax for initializing this type of measurement:

  <init>
      [SET | LIST]
  </init>
  

Defaults to SET (i.e., does not count duplicates).


Constructor Summary
NameListMeasurement(MeasurementDescriptor descriptor, Metrics context, java.lang.String init_text)
           
 
Method Summary
 void Accept(MeasurementVisitor visitor)
           
 void Add(java.lang.Object object)
           
protected  double Compute()
           
 java.lang.Number Value()
           
 java.util.Collection Values()
           
 
Methods inherited from class com.jeantessier.metrics.MeasurementBase
Add, Add, Add, Add, Cached, Cached, Context, Descriptor, doubleValue, floatValue, InRange, intValue, LongName, longValue, Perl, ShortName, 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
Add, Add, Add, Add, Context, Descriptor, doubleValue, floatValue, InRange, intValue, LongName, longValue, ShortName
 

Constructor Detail

NameListMeasurement

public NameListMeasurement(MeasurementDescriptor descriptor,
                           Metrics context,
                           java.lang.String init_text)
Method Detail

Add

public void Add(java.lang.Object object)
Specified by:
Add in interface Measurement
Overrides:
Add in class MeasurementBase

Accept

public void Accept(MeasurementVisitor visitor)
Specified by:
Accept in interface Measurement

Value

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

Compute

protected double Compute()
Overrides:
Compute in class MeasurementBase

Values

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