Package com.jogamp.gluegen.jcpp
Class NumericValue
- java.lang.Object
-
- java.lang.Number
-
- com.jogamp.gluegen.jcpp.NumericValue
-
- All Implemented Interfaces:
Serializable
public class NumericValue extends Number
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
F_DOUBLE
static int
F_FLOAT
static int
F_INT
static int
F_LONG
static int
F_LONGLONG
static int
F_UNSIGNED
static int
FF_SIZE
-
Constructor Summary
Constructors Constructor Description NumericValue(int base, String integer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue()
float
floatValue()
int
getBase()
String
getExponent()
int
getExponentBase()
int
getFlags()
String
getFractionalPart()
String
getIntegerPart()
int
intValue()
long
longValue()
BigDecimal
toBigDecimal()
So, it turns out that parsing arbitrary bases into arbitrary precision numbers is nontrivial, and this routine gets it wrong in many important cases.Number
toJavaLangNumber()
String
toString()
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
F_UNSIGNED
public static final int F_UNSIGNED
- See Also:
- Constant Field Values
-
F_INT
public static final int F_INT
- See Also:
- Constant Field Values
-
F_LONG
public static final int F_LONG
- See Also:
- Constant Field Values
-
F_LONGLONG
public static final int F_LONGLONG
- See Also:
- Constant Field Values
-
F_FLOAT
public static final int F_FLOAT
- See Also:
- Constant Field Values
-
F_DOUBLE
public static final int F_DOUBLE
- See Also:
- Constant Field Values
-
FF_SIZE
public static final int FF_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NumericValue
public NumericValue(@Nonnegative int base, @Nonnull String integer)
-
-
Method Detail
-
getBase
@Nonnegative public int getBase()
-
getIntegerPart
@Nonnull public String getIntegerPart()
-
getFractionalPart
@CheckForNull public String getFractionalPart()
-
getExponentBase
@CheckForSigned public int getExponentBase()
-
getExponent
@CheckForNull public String getExponent()
-
getFlags
public int getFlags()
-
toBigDecimal
@Nonnull public BigDecimal toBigDecimal()
So, it turns out that parsing arbitrary bases into arbitrary precision numbers is nontrivial, and this routine gets it wrong in many important cases.
-
toJavaLangNumber
@Nonnull public Number toJavaLangNumber()
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
-