cppncss.measure
Class AverageCollector

java.lang.Object
  extended by cppncss.measure.AverageCollector
All Implemented Interfaces:
CounterObserver, Collector, FileObserver

public final class AverageCollector
extends java.lang.Object
implements Collector

Collects averages of measures.

Author:
Mathieu Champlon

Constructor Summary
AverageCollector(AverageObserver observer)
          Create an average collector.
 
Method Summary
 void changed(java.lang.String filename)
          Specify the file being processed.
 void flush()
          Output computed measurements.
 void notify(java.lang.String label, java.lang.String item, int line, int count)
          Notify about a measure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageCollector

public AverageCollector(AverageObserver observer)
Create an average collector.

Parameters:
observer - an observer to be notified of the results
Method Detail

notify

public void notify(java.lang.String label,
                   java.lang.String item,
                   int line,
                   int count)
Notify about a measure.

Specified by:
notify in interface CounterObserver
Parameters:
label - the name of the measure
item - the name of the item measured
line - the location of the item
count - the value of the measure

changed

public void changed(java.lang.String filename)
Specify the file being processed.

Specified by:
changed in interface FileObserver
Parameters:
filename - the name of the fle

flush

public void flush()
Output computed measurements.

Specified by:
flush in interface Collector


Copyright © 2006-2007 null. All Rights Reserved.