Package org.apache.groovy.json.internal
Class ValueContainer
java.lang.Object
org.apache.groovy.json.internal.ValueContainer
- All Implemented Interfaces:
java.lang.CharSequence
,Value
public class ValueContainer extends java.lang.Object implements java.lang.CharSequence, Value
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ValueContainer(java.lang.Object value, Type type, boolean decodeStrings)
ValueContainer(java.util.List<java.lang.Object> list)
ValueContainer(java.util.Map<java.lang.String,java.lang.Object> map)
ValueContainer(Type type)
-
Method Summary
Modifier and Type Method Description java.math.BigDecimal
bigDecimalValue()
java.math.BigInteger
bigIntegerValue()
boolean
booleanValue()
byte
byteValue()
char
charAt(int index)
char
charValue()
void
chop()
java.util.Date
dateValue()
double
doubleValue()
float
floatValue()
int
intValue()
boolean
isContainer()
int
length()
long
longValue()
short
shortValue()
java.lang.String
stringValue()
java.lang.String
stringValueEncoded()
java.lang.CharSequence
subSequence(int start, int end)
<T extends java.lang.Enum>
TtoEnum(java.lang.Class<T> cls)
java.lang.String
toString()
java.lang.Object
toValue()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
TRUE
-
FALSE
-
NULL
-
value
public java.lang.Object value -
type
-
decodeStrings
public boolean decodeStrings
-
-
Constructor Details
-
ValueContainer
-
ValueContainer
-
ValueContainer
public ValueContainer(java.util.Map<java.lang.String,java.lang.Object> map) -
ValueContainer
public ValueContainer(java.util.List<java.lang.Object> list)
-
-
Method Details
-
intValue
public int intValue() -
longValue
public long longValue() -
booleanValue
public boolean booleanValue()- Specified by:
booleanValue
in interfaceValue
-
stringValue
public java.lang.String stringValue()- Specified by:
stringValue
in interfaceValue
-
stringValueEncoded
public java.lang.String stringValueEncoded()- Specified by:
stringValueEncoded
in interfaceValue
-
toString
public java.lang.String toString()- Specified by:
toString
in interfacejava.lang.CharSequence
- Overrides:
toString
in classjava.lang.Object
-
toValue
public java.lang.Object toValue() -
toEnum
public <T extends java.lang.Enum> T toEnum(java.lang.Class<T> cls) -
isContainer
public boolean isContainer()- Specified by:
isContainer
in interfaceValue
-
chop
public void chop() -
charValue
public char charValue() -
length
public int length()- Specified by:
length
in interfacejava.lang.CharSequence
-
charAt
public char charAt(int index)- Specified by:
charAt
in interfacejava.lang.CharSequence
-
subSequence
public java.lang.CharSequence subSequence(int start, int end)- Specified by:
subSequence
in interfacejava.lang.CharSequence
-
dateValue
public java.util.Date dateValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Specified by:
shortValue
in interfaceValue
-
bigDecimalValue
public java.math.BigDecimal bigDecimalValue()- Specified by:
bigDecimalValue
in interfaceValue
-
bigIntegerValue
public java.math.BigInteger bigIntegerValue()- Specified by:
bigIntegerValue
in interfaceValue
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfaceValue
-
floatValue
public float floatValue()- Specified by:
floatValue
in interfaceValue
-