public class OperatorOfNumber extends Object
| 构造器和说明 |
|---|
OperatorOfNumber() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
add(Object op1,
Object op2,
boolean isPrecise) |
static int |
compareNumber(Number op1,
Number op2) |
static Number |
divide(Object op1,
Object op2,
boolean isPrecise) |
static int |
getSeq(Class<?> aClass)
获取数据类型精度顺序
|
static Object |
modulo(Object op1,
Object op2) |
static Number |
multiply(Object op1,
Object op2,
boolean isPrecise) |
static double |
round(double v,
int scale) |
static Number |
subtract(Object op1,
Object op2,
boolean isPrecise) |
static Number |
transfer(Number value,
Class<?> type,
boolean isForce)
进行数据类型转换
|
public static double round(double v,
int scale)
public static int getSeq(Class<?> aClass)
aClass - public static Number transfer(Number value, Class<?> type, boolean isForce)
value - type - public static Object add(Object op1, Object op2, boolean isPrecise) throws Exception
Exceptionpublic static Number subtract(Object op1, Object op2, boolean isPrecise) throws Exception
Exceptionpublic static Number multiply(Object op1, Object op2, boolean isPrecise) throws Exception
Exceptionpublic static Number divide(Object op1, Object op2, boolean isPrecise) throws Exception
ExceptionCopyright © 2012–2018 Alibaba Group. All rights reserved.