cppncss.measure
Class Measure

java.lang.Object
  extended by cppncss.measure.Measure
All Implemented Interfaces:
java.lang.Comparable

public final class Measure
extends java.lang.Object
implements java.lang.Comparable

Stores a result measure.

Author:
Mathieu Champlon

Constructor Summary
Measure(java.lang.String item, java.lang.String filename, int line, int count)
          Create a measure.
 
Method Summary
 void accept(MeasureObserver observer)
          Accept a visitor.
 int compareTo(java.lang.Object object)
          
 java.lang.String toString()
          
 void update(java.lang.String item, java.lang.String filename, int line, int count)
          Add a measure value to the recorded values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Measure

public Measure(java.lang.String item,
               java.lang.String filename,
               int line,
               int count)
Create a measure.

Parameters:
item - the name of the measured item
filename - the name of the file containing the item
line - the location of the item within the file
count - the value of the measure
Method Detail

update

public void update(java.lang.String item,
                   java.lang.String filename,
                   int line,
                   int count)
Add a measure value to the recorded values.

If the item name does not match the measure the value is not recorded.

Parameters:
item - the item name
filename - the file name of the item
line - the location of the item
count - the measure to record

accept

public void accept(MeasureObserver observer)
Accept a visitor.

Parameters:
observer - a measure observer

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object object)

Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2006-2007 null. All Rights Reserved.