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.BigDecimalbigDecimalValue()java.math.BigIntegerbigIntegerValue()booleanbooleanValue()bytebyteValue()charcharAt(int index)charcharValue()voidchop()java.util.DatedateValue()doubledoubleValue()floatfloatValue()intintValue()booleanisContainer()intlength()longlongValue()shortshortValue()java.lang.StringstringValue()java.lang.StringstringValueEncoded()java.lang.CharSequencesubSequence(int start, int end)<T extends java.lang.Enum>
TtoEnum(java.lang.Class<T> cls)java.lang.StringtoString()java.lang.ObjecttoValue()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
booleanValuein interfaceValue
-
stringValue
public java.lang.String stringValue()- Specified by:
stringValuein interfaceValue
-
stringValueEncoded
public java.lang.String stringValueEncoded()- Specified by:
stringValueEncodedin interfaceValue
-
toString
public java.lang.String toString()- Specified by:
toStringin interfacejava.lang.CharSequence- Overrides:
toStringin 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:
isContainerin interfaceValue
-
chop
public void chop() -
charValue
public char charValue() -
length
public int length()- Specified by:
lengthin interfacejava.lang.CharSequence
-
charAt
public char charAt(int index)- Specified by:
charAtin interfacejava.lang.CharSequence
-
subSequence
public java.lang.CharSequence subSequence(int start, int end)- Specified by:
subSequencein interfacejava.lang.CharSequence
-
dateValue
public java.util.Date dateValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Specified by:
shortValuein interfaceValue
-
bigDecimalValue
public java.math.BigDecimal bigDecimalValue()- Specified by:
bigDecimalValuein interfaceValue
-
bigIntegerValue
public java.math.BigInteger bigIntegerValue()- Specified by:
bigIntegerValuein interfaceValue
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein interfaceValue
-
floatValue
public float floatValue()- Specified by:
floatValuein interfaceValue
-