ca.utoronto.JCVSReport.metric
Class RegexLineCounter
java.lang.Object
ca.utoronto.JCVSReport.metric.BasicMetric
ca.utoronto.JCVSReport.metric.RegexMatchCounter
ca.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
Method Summary |
int |
countMatches(String contents,
Pattern regex)
Returns number of newlines matched by a specified regular expression |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexLineCounter
public RegexLineCounter()
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 stringregex
- regular expression to match
JCVSReport: Easy Progress Reports for CVS/Java Projects. By David James.