Top Fields Constructors Methods
com.jogamp.gluegen.jcpp

public Class NumericValue

extends Number
Class Inheritance
Imports
java.math.BigDecimal, .BigInteger, javax.annotation.CheckForNull, .CheckForSigned, .Nonnegative, .Nonnull

Field Summary

Modifier and TypeField and Description
private final int
private int
private String
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private int
private String
private final String

Constructor Summary

AccessConstructor and Description
public
NumericValue(int base, String integer)

Method Summary

Modifier and TypeMethod and Description
private boolean
appendFlags(StringBuilder buf, String suffix, int flag)

public double
doubleValue()

Implements abstract java.lang.Number.doubleValue.

Returns the value of the specified number as a double.
private int
public float
floatValue()

Implements abstract java.lang.Number.floatValue.

Returns the value of the specified number as a float.
public int
public String
public int
public int
public String
public String
public int
intValue()

Implements abstract java.lang.Number.intValue.

Returns the value of the specified number as an int.
public long
longValue()

Implements abstract java.lang.Number.longValue.

Returns the value of the specified number as a long.
pack-priv void
setExponent(int expbase, String exponent)

pack-priv void
setFlags(int flags)

pack-priv void
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.

public Number
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Number:
byteValueshortValue

Field Detail

baseback to summary
private final int base
expbaseback to summary
private int expbase
exponentback to summary
private String exponent
F_DOUBLEback to summary
public static final int F_DOUBLE
F_FLOATback to summary
public static final int F_FLOAT
F_INTback to summary
public static final int F_INT
F_LONGback to summary
public static final int F_LONG
F_LONGLONGback to summary
public static final int F_LONGLONG
F_UNSIGNEDback to summary
public static final int F_UNSIGNED
FF_SIZEback to summary
public static final int FF_SIZE
flagsback to summary
private int flags
fractionback to summary
private String fraction
integerback to summary
private final String integer

Constructor Detail

NumericValueback to summary
public NumericValue(int base, String integer)

Method Detail

appendFlagsback to summary
private boolean appendFlags(StringBuilder buf, String suffix, int flag)
doubleValueback to summary
public double doubleValue()

Implements abstract java.lang.Number.doubleValue.

Doc from java.lang.Number.doubleValue.

Returns the value of the specified number as a double.

Returns:double

the numeric value represented by this object after conversion to type double.

Annotations
@Override
exponentValueback to summary
private int exponentValue()
floatValueback to summary
public float floatValue()

Implements abstract java.lang.Number.floatValue.

Doc from java.lang.Number.floatValue.

Returns the value of the specified number as a float.

Returns:float

the numeric value represented by this object after conversion to type float.

Annotations
@Override
getBaseback to summary
public int getBase()
Annotations
@Nonnegative
getExponentback to summary
public String getExponent()
Annotations
@CheckForNull
getExponentBaseback to summary
public int getExponentBase()
Annotations
@CheckForSigned
getFlagsback to summary
public int getFlags()
getFractionalPartback to summary
public String getFractionalPart()
Annotations
@CheckForNull
getIntegerPartback to summary
public String getIntegerPart()
Annotations
@Nonnull
intValueback to summary
public int intValue()

Implements abstract java.lang.Number.intValue.

Doc from java.lang.Number.intValue.

Returns the value of the specified number as an int.

Returns:int

the numeric value represented by this object after conversion to type int.

Annotations
@Override
longValueback to summary
public long longValue()

Implements abstract java.lang.Number.longValue.

Doc from java.lang.Number.longValue.

Returns the value of the specified number as a long.

Returns:long

the numeric value represented by this object after conversion to type long.

Annotations
@Override
setExponentback to summary
pack-priv void setExponent(int expbase, String exponent)
setFlagsback to summary
pack-priv void setFlags(int flags)
setFractionalPartback to summary
pack-priv void setFractionalPart(String fraction)
toBigDecimalback to summary
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.

Annotations
@Nonnull
toJavaLangNumberback to summary
public Number toJavaLangNumber()
Annotations
@Nonnull
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override