Package org.apache.groovy.json.internal
Class NumberValue
- java.lang.Object
-
- java.lang.Number
-
- org.apache.groovy.json.internal.NumberValue
-
- All Implemented Interfaces:
java.io.Serializable
,Value
public class NumberValue extends java.lang.Number implements Value
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumberValue()
NumberValue(boolean chop, Type type, int startIndex, int endIndex, char[] buffer)
NumberValue(Type type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigDecimal
bigDecimalValue()
java.math.BigInteger
bigIntegerValue()
boolean
booleanValue()
byte
byteValue()
char
charValue()
void
chop()
java.util.Date
dateValue()
double
doubleValue()
boolean
equals(java.lang.Object o)
float
floatValue()
int
hashCode()
int
intValue()
boolean
isContainer()
long
longValue()
short
shortValue()
java.lang.String
stringValue()
java.lang.String
stringValueEncoded()
<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)
java.lang.String
toString()
java.lang.Object
toValue()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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, 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
-
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
-
intValue
public int intValue()
-
longValue
public long longValue()
-
byteValue
public byte byteValue()
-
shortValue
public short shortValue()
- Specified by:
shortValue
in interfaceValue
- Overrides:
shortValue
in classjava.lang.Number
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in interfaceValue
- Specified by:
doubleValue
in classjava.lang.Number
-
booleanValue
public boolean booleanValue()
- Specified by:
booleanValue
in interfaceValue
-
floatValue
public float floatValue()
- Specified by:
floatValue
in interfaceValue
- Specified by:
floatValue
in classjava.lang.Number
-
-