Modifier and Type | Field and Description |
---|---|
private int |
lineNumber |
private int |
position |
private String |
postpunctuation |
private String |
prepunctuation |
private String |
token |
private String |
whitespace |
Constructor and Description |
---|
Token() |
Modifier and Type | Method and Description |
---|---|
int |
getLineNumber()
Returns the line of this token in the original text.
|
int |
getPosition()
Returns the position of this token in the original input text.
|
String |
getPostpunctuation()
Returns the postpunctuation characters of this Token.
|
String |
getPrepunctuation()
Returns the prepunctuation characters of this Token.
|
String |
getWhitespace()
Returns the whitespace characters of this Token.
|
String |
getWord()
Returns the string associated with this token.
|
void |
setLineNumber(int lineNumber)
Set the line of this token in the original text.
|
void |
setPosition(int position)
Sets the position of the token in the original input text.
|
void |
setPostpunctuation(String postpunctuation)
Sets the postpunctuation characters of this Token.
|
void |
setPrepunctuation(String prepunctuation)
Sets the prepunctuation characters of this Token.
|
void |
setWhitespace(String whitespace)
Sets the whitespace characters of this Token.
|
void |
setWord(String word)
Sets the string of this Token.
|
String |
toString()
Converts this token to a string.
|
private String whitespace
private String prepunctuation
private String postpunctuation
private int position
private int lineNumber
public Token()
public String getWhitespace()
public String getPrepunctuation()
public String getPostpunctuation()
public int getPosition()
public int getLineNumber()
public void setWhitespace(String whitespace)
whitespace
- the whitespace character for this tokenpublic void setPrepunctuation(String prepunctuation)
prepunctuation
- the prepunctuation characterspublic void setPostpunctuation(String postpunctuation)
postpunctuation
- the postpunctuation characterspublic void setPosition(int position)
position
- the position of the input textpublic void setLineNumber(int lineNumber)
lineNumber
- the line of this token in the original textpublic String getWord()
public void setWord(String word)
word
- the word for this tokenWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses