org.hackystat.sensor.ant.vcs
Class GenericDiffCounter

java.lang.Object
  extended by org.hackystat.sensor.ant.vcs.GenericDiffCounter

public class GenericDiffCounter
extends java.lang.Object

Diff counter, which wraps around JRCS diff engine.

Note that if this class is used to diff two text files, then empty lines and comments are considered in diff result. This may or may not be desired. Also note that if you try to diff two binary files, you either get an exception or an incorrect result.

Version:
$Id: GenericDiffCounter.java,v 1.1.1.1 2005/10/20 23:56:56 johnson Exp $
Author:
Qin ZHANG

Constructor Summary
GenericDiffCounter(java.lang.Object[] original, java.lang.Object[] revised)
          Constructs this instance to diff two revisions.
 
Method Summary
 int getLinesAdded()
          Gets the lines added.
 int getLinesDeleted()
          Gets the lines deleted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDiffCounter

public GenericDiffCounter(java.lang.Object[] original,
                          java.lang.Object[] revised)
                   throws java.lang.Exception
Constructs this instance to diff two revisions.

Parameters:
original - The original version.
revised - The revision.
Throws:
java.lang.Exception - If there is error in diff engine.
Method Detail

getLinesAdded

public int getLinesAdded()
Gets the lines added.

Returns:
The number of lines added.

getLinesDeleted

public int getLinesDeleted()
Gets the lines deleted.

Returns:
The number of lines deleted.