public class StringValue extends java.lang.Object implements Expression, PrimitiveValue
PrimitiveValue.InvalidPrimitive
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
value |
Constructor and Description |
---|
StringValue(java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
void |
accept(ExpressionVisitor expressionVisitor) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getNotExcapedValue() |
PrimitiveType |
getType() |
java.lang.String |
getValue() |
int |
hashCode() |
static StringValue |
parseEscaped(java.lang.String escapedValue) |
void |
setValue(java.lang.String string) |
boolean |
toBool()
The boolean value of this primitive
|
double |
toDouble()
The double value of this primitive
|
long |
toLong()
The long value of this primitive
|
java.lang.String |
toRawString()
An unescaped string encoding of this primitive value.
|
java.lang.String |
toString() |
public static StringValue parseEscaped(java.lang.String escapedValue)
public java.lang.String getValue()
public java.lang.String getNotExcapedValue()
public void setValue(java.lang.String string)
public void accept(ExpressionVisitor expressionVisitor)
accept
in interface Expression
public java.lang.String toRawString()
PrimitiveValue
toRawString
in interface PrimitiveValue
public java.lang.String toString()
toString
in class java.lang.Object
public long toLong() throws PrimitiveValue.InvalidPrimitive
PrimitiveValue
toLong
in interface PrimitiveValue
PrimitiveValue.InvalidPrimitive
- otherwisepublic double toDouble() throws PrimitiveValue.InvalidPrimitive
PrimitiveValue
toDouble
in interface PrimitiveValue
PrimitiveValue.InvalidPrimitive
- otherwisepublic boolean toBool() throws PrimitiveValue.InvalidPrimitive
PrimitiveValue
toBool
in interface PrimitiveValue
PrimitiveValue.InvalidPrimitive
- otherwisepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public PrimitiveType getType()
getType
in interface PrimitiveValue