Package net.sourceforge.pmd.cpd
Class Match
- java.lang.Object
-
- net.sourceforge.pmd.cpd.Match
-
- All Implemented Interfaces:
Comparable<Match>,Iterable<Mark>
public class Match extends Object implements Comparable<Match>, Iterable<Mark>
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Match>LABEL_COMPARATORstatic Comparator<Match>LENGTH_COMPARATORstatic Comparator<Match>LINES_COMPARATORstatic Comparator<Match>MATCHES_COMPARATOR
-
Constructor Summary
Constructors Constructor Description Match(int tokenCount, Mark first, Mark second)Match(int tokenCount, TokenEntry first, TokenEntry second)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTokenEntry(TokenEntry entry)intcompareTo(Match other)intgetEndIndex()MarkgetFirstMark()StringgetLabel()intgetLineCount()intgetMarkCount()Set<Mark>getMarkSet()MarkgetSecondMark()StringgetSourceCodeSlice()Newlines are normalized to \n.intgetTokenCount()Iterator<Mark>iterator()voidsetLabel(String aLabel)voidsetMarkSet(Set<Mark> markSet)StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
MATCHES_COMPARATOR
public static final Comparator<Match> MATCHES_COMPARATOR
-
LINES_COMPARATOR
public static final Comparator<Match> LINES_COMPARATOR
-
LABEL_COMPARATOR
public static final Comparator<Match> LABEL_COMPARATOR
-
LENGTH_COMPARATOR
public static final Comparator<Match> LENGTH_COMPARATOR
-
-
Constructor Detail
-
Match
public Match(int tokenCount, TokenEntry first, TokenEntry second)
-
-
Method Detail
-
getMarkCount
public int getMarkCount()
-
getLineCount
public int getLineCount()
-
getTokenCount
public int getTokenCount()
-
getSourceCodeSlice
public String getSourceCodeSlice()
Newlines are normalized to \n.
-
compareTo
public int compareTo(Match other)
- Specified by:
compareToin interfaceComparable<Match>
-
getFirstMark
public Mark getFirstMark()
-
getSecondMark
public Mark getSecondMark()
-
getEndIndex
public int getEndIndex()
-
setLabel
public void setLabel(String aLabel)
-
getLabel
public String getLabel()
-
addTokenEntry
public void addTokenEntry(TokenEntry entry)
-
-