org.hackystat.sensor.ant.vcs
Class GenericSizeCounter

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

public class GenericSizeCounter
extends java.lang.Object

Generic size counter. Note that this class is not desinged to count binary files.

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

Constructor Summary
GenericSizeCounter(java.lang.Object[] content)
          Construct this instance to count lines.
 
Method Summary
 int getNumOfNonEmptyLines()
          Gets the number of lines, excluding empty lines.
 int getNumOfTotalLines()
          Gets the total number of lines, including empty lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSizeCounter

public GenericSizeCounter(java.lang.Object[] content)
Construct this instance to count lines.

Parameters:
content - The file content.
Method Detail

getNumOfTotalLines

public int getNumOfTotalLines()
Gets the total number of lines, including empty lines.

Returns:
The total number of lines.

getNumOfNonEmptyLines

public int getNumOfNonEmptyLines()
Gets the number of lines, excluding empty lines.

Returns:
The number of lines, excluding empty lines.