net.ultrametrics.qcvs
Class Statistic

java.lang.Object
  |
  +--net.ultrametrics.qcvs.Statistic

public class Statistic
extends java.lang.Object
implements java.lang.Cloneable

A statistic for CVS modifications.

Simply a container which bundles currently tallied statistics in a single, convenient place.


Constructor Summary
Statistic()
           
Statistic(int revised, int added, int removed, int net)
           
 
Method Summary
 java.lang.Object clone()
           
 int getNet()
           
 int getRevised()
           
 void increment(int revised, int added, int removed, int net)
           
 void increment(Statistic statistic)
           
protected static void incrementInMap(java.lang.Object key, java.util.Map map, Statistic s)
          Increment, in-place, a statistic located in a map under 'key', by an amount equal to the provided statistic 's'.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Statistic

public Statistic()

Statistic

public Statistic(int revised,
                 int added,
                 int removed,
                 int net)
Method Detail

getRevised

public int getRevised()

getNet

public int getNet()

increment

public void increment(int revised,
                      int added,
                      int removed,
                      int net)

increment

public void increment(Statistic statistic)

incrementInMap

protected static void incrementInMap(java.lang.Object key,
                                     java.util.Map map,
                                     Statistic s)
Increment, in-place, a statistic located in a map under 'key', by an amount equal to the provided statistic 's'.

If the map doesn't contain a statistic under the specified key, create a new statistic and store it there (by cloning 's').


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object