|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.globalphasing.startools.StarToken
public class StarToken
Class representing a token from a STAR file.
Normally, this class is not instantiated directly, but instances are returned
by successive invocations of the StarTokeniser.nextToken()
method.
Method Summary | |
---|---|
int |
getLineNumberEnd()
Ending line number of the match operation that produced this token. |
int |
getLineNumberStart()
Starting line number of the match operation that produced this token. |
int |
getMatchEnd()
Character offset from the start of the line returned by getLineNumberStart() that corresponds to the character
immediately after the last one of the match that produced this token. |
int |
getMatchStart()
Character offset from the start of the line returned by getLineNumberStart() that corresponds to the first character
of the match that produced this token. |
int |
getType()
Getter for token's numeric type. |
String |
getTypeString()
Getter for token's type as a descriptive string. |
String |
getValue()
Getter for token's value as a string. |
boolean |
starOnly()
Return true if token is a valid STAR token, but not allowed in CIF's or mmCIF's. |
String |
toString()
Returns a human-readable summary of the token's contents. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getType()
StarTokenTypes
public String getTypeString()
StarTokenTypes
with the initial TOKEN_ removed).public String getValue()
public boolean starOnly()
public int getLineNumberStart()
StarTokeniser.startMatching(CharSequence)
) or by matching
the entire file contents in a single operation (by using
StarTokeniser.startMatching(java.io.File, boolean)
),
the match operation will always have started at the beginning
of the data. Accordingly, this method will return a value of 1.
public int getLineNumberEnd()
StarTokeniser.startMatching(java.io.File)
or StarTokeniser.startMatching(java.io.File, int)
this method
returns the line number of the last line of the data that was being
matched when this token was produced.
When the token was produced from character data (by using
StarTokeniser.startMatching(CharSequence)
) or by matching
the entire file contents in a single operation (by using
StarTokeniser.startMatching(java.io.File, boolean)
),
this method returns StarTokenTypes.EOF
StarTokenTypes.EOF
public int getMatchStart()
getLineNumberStart()
that corresponds to the first character
of the match that produced this token.
Note that this value may not be meaningful when processing very large files
using StarTokeniser.startMatching(java.io.File, boolean)
public int getMatchEnd()
getLineNumberStart()
that corresponds to the character
immediately after the last one of the match that produced this token.
Note that this value may not be meaningful when processing very large files
using StarTokeniser.startMatching(java.io.File, boolean)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |