|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.common.text.TokenStream.CaseSensitiveToken
@Immutable protected class TokenStream.CaseSensitiveToken

An immutable TokenStream.Token that implements matching using case-sensitive logic.
| Constructor Summary | |
|---|---|
TokenStream.CaseSensitiveToken(int startIndex,
int endIndex,
int type,
Position position)
|
|
| Method Summary | |
|---|---|
int |
endIndex()
Get the index in the raw stream past the last character in the token. |
int |
length()
Get the length of the token, which is equivalent to endIndex() - startIndex(). |
boolean |
matches(char expected)
Determine if the token matches the supplied character. |
boolean |
matches(int expectedType)
Determine if the token matches the supplied type. |
boolean |
matches(String expected)
Determine if the token matches the supplied string. |
protected String |
matchString()
|
Position |
position()
Get the position of this token, which includes the line number and column number of the first character in the token. |
int |
startIndex()
Get the index in the raw stream for the first character in the token. |
String |
toString()
|
int |
type()
Get the type of the token. |
String |
value()
Get the value of the token, in actual case. |
TokenStream.Token |
withType(int typeMask)
Bitmask ORed with existing type value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TokenStream.CaseSensitiveToken(int startIndex,
int endIndex,
int type,
Position position)
| Method Detail |
|---|
public TokenStream.Token withType(int typeMask)
withType in interface TokenStream.TokenTokenStream.Token.withType(int)public final int type()
type in interface TokenStream.TokenTokenStream.Token.type()public final int startIndex()
startIndex in interface TokenStream.TokenTokenStream.Token.startIndex()public final int endIndex()
endIndex in interface TokenStream.TokenTokenStream.Token.endIndex()public final int length()
endIndex() - startIndex().
length in interface TokenStream.TokenTokenStream.Token.length()public final boolean matches(char expected)
matches in interface TokenStream.Tokenexpected - the expected character value
TokenStream.Token.matches(char)public final boolean matches(String expected)
matches in interface TokenStream.Tokenexpected - the expected value
TokenStream.Token.matches(java.lang.String)public final boolean matches(int expectedType)
matches in interface TokenStream.TokenexpectedType - the expected integer type
TokenStream.Token.matches(int)public final String value()
value in interface TokenStream.TokenTokenStream.Token.value()public Position position()
position in interface TokenStream.TokenTokenStream.Token.position()protected String matchString()
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||