ca.utoronto.JCVSReport.metric
Class RegexLineCounter

java.lang.Object
  extended byca.utoronto.JCVSReport.metric.BasicMetric
      extended byca.utoronto.JCVSReport.metric.RegexMatchCounter
          extended byca.utoronto.JCVSReport.metric.RegexLineCounter
All Implemented Interfaces:
Metric

public class RegexLineCounter
extends RegexMatchCounter

RegexLineCounter: Class that is used to count number of newlines for the specified regular expression in the search string.

Author:
David James, Olga Rodimina

Field Summary
 
Fields inherited from class ca.utoronto.JCVSReport.metric.BasicMetric
id, insertMetric, props
 
Constructor Summary
RegexLineCounter()
           
 
Method Summary
 int countMatches(String contents, Pattern regex)
          Returns number of newlines matched by a specified regular expression
 
Methods inherited from class ca.utoronto.JCVSReport.metric.RegexMatchCounter
init, processRevision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexLineCounter

public RegexLineCounter()
Method Detail

countMatches

public int countMatches(String contents,
                        Pattern regex)
Returns number of newlines matched by a specified regular expression

Overrides:
countMatches in class RegexMatchCounter
Parameters:
contents - The contents of the file as a string
regex - regular expression to match


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