|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.kawa.functions.Arithmetic
public class Arithmetic
Field Summary | |
---|---|
static int |
BIGDECIMAL_CODE
Promotion code for java.math.BigDecimal. |
static int |
BIGINTEGER_CODE
Promotion code for java.math.BigInteger. |
static int |
DOUBLE_CODE
Promotion code double/Double. |
static int |
FLOAT_CODE
Promotion code float/Float. |
static int |
FLONUM_CODE
Promotion code for gnu.math.FloNum. |
static int |
INT_CODE
Promotion code for byte/Byte, short/Short, int/Integer. |
static int |
INTNUM_CODE
Promotion code for gnu.math.IntNum. |
static int |
LONG_CODE
Promotion code for long/Long. |
static int |
NUMERIC_CODE
Promotion code for other gnu.math.Numeric. |
static int |
RATNUM_CODE
Promotion code for gnu.math.RatNum. |
static IntNum |
ten_exp_9
|
Constructor Summary | |
---|---|
Arithmetic()
|
Method Summary | |
---|---|
static java.math.BigDecimal |
asBigDecimal(java.lang.Object value)
|
static java.math.BigInteger |
asBigInteger(java.lang.Object value)
|
static double |
asDouble(java.lang.Object value)
|
static float |
asFloat(java.lang.Object value)
|
static int |
asInt(java.lang.Object value)
|
static IntNum |
asIntNum(java.math.BigDecimal value)
|
static IntNum |
asIntNum(java.math.BigInteger value)
|
static IntNum |
asIntNum(java.lang.Object value)
|
static long |
asLong(java.lang.Object value)
|
static Numeric |
asNumeric(java.lang.Object value)
|
static RatNum |
asRatNum(java.lang.Object value)
|
static int |
classifyValue(java.lang.Object value)
|
static java.lang.Object |
convert(java.lang.Object value,
int code)
Coerce a number to one of the Arithmetic.XXX_CODE types. |
static java.lang.String |
toString(java.lang.Object number,
int radix)
Convert a number to a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INT_CODE
public static final int LONG_CODE
public static final int BIGINTEGER_CODE
public static final int INTNUM_CODE
public static final int BIGDECIMAL_CODE
public static final int RATNUM_CODE
public static final int FLOAT_CODE
public static final int DOUBLE_CODE
public static final int FLONUM_CODE
public static final int NUMERIC_CODE
public static final IntNum ten_exp_9
Constructor Detail |
---|
public Arithmetic()
Method Detail |
---|
public static int classifyValue(java.lang.Object value)
public static int asInt(java.lang.Object value)
public static long asLong(java.lang.Object value)
public static float asFloat(java.lang.Object value)
public static double asDouble(java.lang.Object value)
public static java.math.BigInteger asBigInteger(java.lang.Object value)
public static IntNum asIntNum(java.math.BigDecimal value)
public static IntNum asIntNum(java.math.BigInteger value)
public static IntNum asIntNum(java.lang.Object value)
public static java.math.BigDecimal asBigDecimal(java.lang.Object value)
public static RatNum asRatNum(java.lang.Object value)
public static Numeric asNumeric(java.lang.Object value)
public static java.lang.String toString(java.lang.Object number, int radix)
public static java.lang.Object convert(java.lang.Object value, int code)
> Arithmetic.classifyValue(value)
, though
the converse might also work.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |