static class BaseToken.StringToken extends BaseToken<String>
BaseToken.BooleanToken, BaseToken.FloatToken, BaseToken.IntegerToken, BaseToken.KeywordToken, BaseToken.LiteralToken, BaseToken.StringToken| Modifier | Constructor and Description |
|---|---|
|
BaseToken.StringToken(Position position,
String raw,
String value)
Dedicated constructor.
|
private |
BaseToken.StringToken(TokenType type,
Position position,
String raw,
String value)
Constructor for sub classes.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
asBoolean()
Get the boolean typed value.
|
Float |
asFloat()
Get the float typed value.
|
Integer |
asInteger()
Get the integer typed value.
|
asString, equals, getPosition, getRaw, getType, getValue, hashCode, raiseUnsupportedValueOperationError, toStringpublic BaseToken.StringToken(Position position, String raw, String value)
position - must not be nullraw - must not be nullvalue - must not be nullpublic Boolean asBoolean()
Token
This method throws UnsupportedOperationException if the token's token class
is not of type TokenType.BOOLEAN.
nullpublic Float asFloat()
Token
This method throws UnsupportedOperationException if the token's token class
is not of type TokenType.FLOAT.
nullpublic Integer asInteger()
Token
This method throws UnsupportedOperationException if the token's token class
is not of type TokenType.INTEGER.
nullCopyright © 2014 Sven Strittmatter. All Rights Reserved.