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 intF_DOUBLEstatic intF_FLOATstatic intF_INTstatic intF_LONGstatic intF_LONGLONGstatic intF_UNSIGNEDstatic intFF_SIZE
-
Constructor Summary
Constructors Constructor Description NumericValue(int base, String integer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledoubleValue()floatfloatValue()intgetBase()StringgetExponent()intgetExponentBase()intgetFlags()StringgetFractionalPart()StringgetIntegerPart()intintValue()longlongValue()BigDecimaltoBigDecimal()So, it turns out that parsing arbitrary bases into arbitrary precision numbers is nontrivial, and this routine gets it wrong in many important cases.NumbertoJavaLangNumber()StringtoString()-
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:
floatValuein classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
-