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 BigDecimalbigDecimalValue()BigIntegerbigIntegerValue()booleanbooleanValue()bytebyteValue()charcharValue()voidchop()DatedateValue()doubledoubleValue()booleanequals(Object o)floatfloatValue()inthashCode()intintValue()booleanisContainer()longlongValue()shortshortValue()StringstringValue()StringstringValueEncoded()<T extends Enum>
TtoEnum(Class<T> cls)static <T extends Enum>
TtoEnum(Class<T> cls, int value)StringtoString()ObjecttoValue()
-
Constructor Details
-
NumberValue
-
NumberValue
public NumberValue() -
NumberValue
-
-
Method Details
-
toString
-
toValue
-
toEnum
-
toEnum
-
isContainer
public boolean isContainer()- Specified by:
isContainerin interfaceValue
-
equals
-
hashCode
public int hashCode() -
bigDecimalValue
- Specified by:
bigDecimalValuein interfaceValue
-
bigIntegerValue
- Specified by:
bigIntegerValuein interfaceValue
-
stringValue
- Specified by:
stringValuein interfaceValue
-
stringValueEncoded
- Specified by:
stringValueEncodedin interfaceValue
-
dateValue
-
intValue
public int intValue() -
longValue
public long longValue() -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Specified by:
shortValuein interfaceValue- Overrides:
shortValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein interfaceValue- Specified by:
doubleValuein classNumber
-
booleanValue
public boolean booleanValue()- Specified by:
booleanValuein interfaceValue
-
floatValue
public float floatValue()- Specified by:
floatValuein interfaceValue- Specified by:
floatValuein classNumber
-
chop
public final void chop() -
charValue
public char charValue()
-