|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.text.TokenDetails
public class TokenDetails
Stores details on a token in a document.
Constructor Summary | |
---|---|
TokenDetails(String theToken,
int tokenRep,
int tokenIndex,
boolean wsBefore)
Creates a new instance. |
Method Summary | |
---|---|
int |
getIndex()
Returns the index of the token in the original text (indexing starts with 0). |
int |
getRep()
Returns the repetition of the token in the original text (counting starts with 0, as the first occurrence is the "0th repetition"). |
String |
getToken()
Returns the token itself. |
boolean |
isWhitespaceBefore()
Whether there is whitespace before the token. |
void |
setRep(int newRep)
Modifies the repetition of the token in the original text (counting starts with 0, as the first occurrence is the "0th repetition"). |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TokenDetails(String theToken, int tokenRep, int tokenIndex, boolean wsBefore)
theToken
- the token to representtokenRep
- the repetition of the token in the document (counting
starts with 0, as the first occurrence is the "0th repetition")tokenIndex
- the index of the token in the document (counting
starts with 0 for the very first token)wsBefore
- whether there is whitespace before the main
token
(either at the end of left
or in the
preceding element)Method Detail |
---|
public int getIndex()
public int getRep()
public String getToken()
public boolean isWhitespaceBefore()
public void setRep(int newRep)
newRep
- the new value of the attributepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |