|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Value
Represents a value (e.g., of a property) in the intermediate representation.
Method Summary | |
---|---|
Value[] |
asArray()
Gets the representation of this value as an array of values. |
boolean |
asBoolean()
Gets the boolean representation of this value |
double |
asDouble()
Returns the representation of this value as a double |
Entity |
asEntity()
Returns the value as an entity |
int |
asInteger()
Returns the representation of this value as an integer |
LiteralValue |
asLiteral()
Returns this value as a literal. |
java.lang.String |
asString()
Returns the representation of this value as string (without the quotes). |
boolean |
isArray()
Checks whether this value is an array of values. |
boolean |
isBoolean()
Checks whether this value can be as a boolean (i.e., contains "true" or "false", case insensitive) |
boolean |
isDouble()
Checks whether this value can be represented as a double |
boolean |
isEntity()
Checks whether this value is an entity. |
boolean |
isInteger()
Checks whether this value is a valid integer. |
boolean |
isLiteral()
Checks whether this value is a literal (i.e., not an array or entity) |
Method Detail |
---|
java.lang.String asString()
boolean isLiteral()
LiteralValue asLiteral() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value is not a literal (isLiteral() should return false in such a case)boolean isInteger()
int asInteger() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value cannot be represented as an integer (isInteger() should return false in such a case)boolean isDouble()
double asDouble() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value cannot be represented as a double (isDouble() should return false in such a case)boolean isBoolean()
boolean asBoolean() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value cannot be represented as a boolean (isBoolean should return false in such a case)boolean isArray()
Value[] asArray() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value cannot be represented as an array (isArray() should return false in such a case).boolean isEntity()
Entity asEntity() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if this value cannot be represented as an entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |