cppncss.measure
Class SumCollector

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

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

Collects sums of measures.

Author:
Mathieu Champlon

Constructor Summary
SumCollector(SumObserver observer)
          Create a sum 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

SumCollector

public SumCollector(SumObserver observer)
Create a sum 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.