cppncss.measure
Class MeasureCollector

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

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

Collects measures.

The results are sorted according to the value of the first measure.

The different measures for a given item must be recorded one after another.

Author:
Mathieu Champlon

Constructor Summary
MeasureCollector(Options options, MeasureObserver observer)
          Create a measure 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

MeasureCollector

public MeasureCollector(Options options,
                        MeasureObserver observer)
Create a measure collector.

Parameters:
options - the options
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.