public class Token extends Object
Token object contains a single String, a startOffset and the
length of the String. These attributes are set or returned in response to
requests.| Constructor and Description |
|---|
Token()
Create a new token with a null content.
|
Token(String str) |
Token(String str,
int startOffset,
int tokenLength)
Creates a new
Token with the given content. |
| Modifier and Type | Method and Description |
|---|---|
String |
getTokenValue() |
void |
setStartOffset(int beginPosition)
Set the token offset.
|
void |
setTokenLength(int tokLength)
Set the length of the token.
|
void |
setTokenValue(String value)
Set the value for the token.
|
int |
startOffset()
Get the token starting offset.
|
int |
tokenLength()
Get the token length.
|
String |
toString() |
public Token()
public Token(String str)
public Token(String str, int startOffset, int tokenLength)
Token with the given content.str - The new token's valuestartOffset - Start offset in original texttokenLength - End offset in original textpublic String getTokenValue()
public void setTokenValue(String value)
value - The value for the tokenpublic int startOffset()
public int tokenLength()
public void setStartOffset(int beginPosition)
beginPosition - the startOffsetpublic void setTokenLength(int tokLength)
tokLength - the lengthCopyright © 2015 IXA pipes. All rights reserved.