Package net.sourceforge.pmd.cpd
Class TokenEntry
- java.lang.Object
-
- net.sourceforge.pmd.cpd.TokenEntry
-
- All Implemented Interfaces:
Comparable<TokenEntry>
public class TokenEntry extends Object implements Comparable<TokenEntry>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTokenEntry.StateDeprecated.This is internal API.
-
Field Summary
Fields Modifier and Type Field Description static TokenEntryEOF
-
Constructor Summary
Constructors Constructor Description TokenEntry(String image, String tokenSrcID, int beginLine)Deprecated.UseTokenEntry(String, String, int, int, int), don't be lazyTokenEntry(String image, String tokenSrcID, int beginLine, int beginColumn, int endColumn)Creates a new token entry with the given informations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearImages()intcompareTo(TokenEntry other)booleanequals(Object o)intgetBeginColumn()The column number where this token begins.intgetBeginLine()intgetEndColumn()The column number where this token ends.static TokenEntrygetEOF()intgetIdentifier()intgetIndex()StringgetTokenSrcID()inthashCode()voidsetHashCode(int hashCode)StringtoString()
-
-
-
Field Detail
-
EOF
public static final TokenEntry EOF
-
-
Constructor Detail
-
TokenEntry
@Deprecated public TokenEntry(String image, String tokenSrcID, int beginLine)
Deprecated.UseTokenEntry(String, String, int, int, int), don't be lazyCreates a new token entry with the given informations.- Parameters:
image-tokenSrcID-beginLine- the linenumber, 1-based.
-
TokenEntry
public TokenEntry(String image, String tokenSrcID, int beginLine, int beginColumn, int endColumn)
Creates a new token entry with the given informations.- Parameters:
image-tokenSrcID-beginLine- the linenumber, 1-based.beginColumn- the column number, 1-basedendColumn- the column number, 1-based
-
-
Method Detail
-
getEOF
public static TokenEntry getEOF()
-
clearImages
public static void clearImages()
-
getTokenSrcID
public String getTokenSrcID()
-
getBeginLine
public int getBeginLine()
-
getBeginColumn
public int getBeginColumn()
The column number where this token begins. returns -1 if not available- Returns:
- the begin column number
-
getEndColumn
public int getEndColumn()
The column number where this token ends. returns -1 if not available- Returns:
- the end column number
-
getIdentifier
public int getIdentifier()
-
getIndex
public int getIndex()
-
setHashCode
public void setHashCode(int hashCode)
-
compareTo
public int compareTo(TokenEntry other)
- Specified by:
compareToin interfaceComparable<TokenEntry>
-
-