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 class
TokenEntry.State
Deprecated.This is internal API.
-
Field Summary
Fields Modifier and Type Field Description static TokenEntry
EOF
-
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 void
clearImages()
int
compareTo(TokenEntry other)
boolean
equals(Object o)
int
getBeginColumn()
The column number where this token begins.int
getBeginLine()
int
getEndColumn()
The column number where this token ends.static TokenEntry
getEOF()
int
getIdentifier()
int
getIndex()
String
getTokenSrcID()
int
hashCode()
void
setHashCode(int hashCode)
String
toString()
-
-
-
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:
compareTo
in interfaceComparable<TokenEntry>
-
-