ca.utoronto.JCVSReport.metric
Class MetricRevisionMap
java.lang.Object
java.util.AbstractMap
java.util.TreeMap
ca.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 |
MetricRevisionMap
public MetricRevisionMap(Comparator comp)
- Create a new MetricRevisionMap which uses the specified Comparator
to sort values and determine equality
- Parameters:
comp
- The Comparator
putDouble
public void putDouble(Object key,
double value)
- Associate a revision with a number
- Parameters:
key
- The revisionvalue
- 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.