Package org.apache.groovy.json.internal
Class CharSequenceValue
java.lang.Object
org.apache.groovy.json.internal.CharSequenceValue
- All Implemented Interfaces:
java.lang.CharSequence
,Value
public class CharSequenceValue extends java.lang.Object implements Value, java.lang.CharSequence
-
Constructor Summary
Constructors Constructor Description CharSequenceValue(boolean chop, Type type, int startIndex, int endIndex, char[] buffer, boolean encoded, boolean checkDate)
-
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()
boolean
equals(java.lang.Object o)
float
floatValue()
int
hashCode()
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)
static <T extends java.lang.Enum>
TtoEnum(java.lang.Class<T> cls, int value)
static <T extends java.lang.Enum>
TtoEnum(java.lang.Class<T> cls, java.lang.String value)
java.lang.String
toString()
java.lang.Object
toValue()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
CharSequenceValue
public CharSequenceValue(boolean chop, Type type, int startIndex, int endIndex, char[] buffer, boolean encoded, boolean checkDate)
-
-
Method Details
-
toString
public java.lang.String toString()- Specified by:
toString
in interfacejava.lang.CharSequence
- Overrides:
toString
in classjava.lang.Object
-
toValue
public final java.lang.Object toValue() -
toEnum
public <T extends java.lang.Enum> T toEnum(java.lang.Class<T> cls) -
toEnum
public static <T extends java.lang.Enum> T toEnum(java.lang.Class<T> cls, java.lang.String value) -
toEnum
public static <T extends java.lang.Enum> T toEnum(java.lang.Class<T> cls, int value) -
isContainer
public boolean isContainer()- Specified by:
isContainer
in interfaceValue
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
length
public final int length()- Specified by:
length
in interfacejava.lang.CharSequence
-
charAt
public final char charAt(int index)- Specified by:
charAt
in interfacejava.lang.CharSequence
-
subSequence
public final java.lang.CharSequence subSequence(int start, int end)- Specified by:
subSequence
in interfacejava.lang.CharSequence
-
bigDecimalValue
public java.math.BigDecimal bigDecimalValue()- Specified by:
bigDecimalValue
in interfaceValue
-
bigIntegerValue
public java.math.BigInteger bigIntegerValue()- Specified by:
bigIntegerValue
in interfaceValue
-
stringValue
public java.lang.String stringValue()- Specified by:
stringValue
in interfaceValue
-
stringValueEncoded
public java.lang.String stringValueEncoded()- Specified by:
stringValueEncoded
in interfaceValue
-
dateValue
public java.util.Date dateValue() -
intValue
public int intValue() -
longValue
public long longValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Specified by:
shortValue
in interfaceValue
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfaceValue
-
booleanValue
public boolean booleanValue()- Specified by:
booleanValue
in interfaceValue
-
floatValue
public float floatValue()- Specified by:
floatValue
in interfaceValue
-
chop
public final void chop() -
charValue
public char charValue()
-