ca.utoronto.JCVSReport.metric
Class MetricRevisionMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.TreeMap
          extended byca.utoronto.JCVSReport.metric.MetricRevisionMap
All Implemented Interfaces:
Cloneable, Map, Serializable, SortedMap

public class MetricRevisionMap
extends TreeMap

Store and retrieve metric values according to the specified Comparator object

Author:
David James
See Also:
Serialized Form

Constructor Summary
MetricRevisionMap(Comparator comp)
          Create a new MetricRevisionMap which uses the specified Comparator to sort values and determine equality
 
Method Summary
 double getDouble(Object key)
          Get the number associated with a revision object
 void putDouble(Object key, double value)
          Associate a revision with a number
 double sum(String metricName)
          Retrieve sum of each metric
 
Methods inherited from class java.util.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

MetricRevisionMap

public MetricRevisionMap(Comparator comp)
Create a new MetricRevisionMap which uses the specified Comparator to sort values and determine equality

Parameters:
comp - The Comparator
Method Detail

putDouble

public void putDouble(Object key,
                      double value)
Associate a revision with a number

Parameters:
key - The revision
value - The integer

getDouble

public double getDouble(Object key)
Get the number associated with a revision object

Parameters:
key - The revision object

sum

public double sum(String metricName)
Retrieve sum of each metric

Parameters:
metricName - the name of the metric


JCVSReport: Easy Progress Reports for CVS/Java Projects. By David James.