Package org.apache.groovy.json.internal
Class NumberValue
java.lang.Object
java.lang.Number
org.apache.groovy.json.internal.NumberValue
- All Implemented Interfaces:
Serializable
,Value
public class NumberValue extends 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
Modifier and Type Method Description BigDecimal
bigDecimalValue()
BigInteger
bigIntegerValue()
boolean
booleanValue()
byte
byteValue()
char
charValue()
void
chop()
Date
dateValue()
double
doubleValue()
boolean
equals(Object o)
float
floatValue()
int
hashCode()
int
intValue()
boolean
isContainer()
long
longValue()
short
shortValue()
String
stringValue()
String
stringValueEncoded()
<T extends Enum>
TtoEnum(Class<T> cls)
static <T extends Enum>
TtoEnum(Class<T> cls, int value)
String
toString()
Object
toValue()
-
Constructor Details
-
NumberValue
-
NumberValue
public NumberValue() -
NumberValue
-
-
Method Details
-
toString
-
toValue
-
toEnum
-
toEnum
-
isContainer
public boolean isContainer()- Specified by:
isContainer
in interfaceValue
-
equals
-
hashCode
public int hashCode() -
bigDecimalValue
- Specified by:
bigDecimalValue
in interfaceValue
-
bigIntegerValue
- Specified by:
bigIntegerValue
in interfaceValue
-
stringValue
- Specified by:
stringValue
in interfaceValue
-
stringValueEncoded
- Specified by:
stringValueEncoded
in interfaceValue
-
dateValue
-
intValue
public int intValue() -
longValue
public long longValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Specified by:
shortValue
in interfaceValue
- Overrides:
shortValue
in classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfaceValue
- Specified by:
doubleValue
in classNumber
-
booleanValue
public boolean booleanValue()- Specified by:
booleanValue
in interfaceValue
-
floatValue
public float floatValue()- Specified by:
floatValue
in interfaceValue
- Specified by:
floatValue
in classNumber
-
chop
public final void chop() -
charValue
public char charValue()
-