public class ObjectUtils extends Object
| 构造器和说明 |
|---|
ObjectUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
compare(Object obj1,
Object obj2)
Compares two comparable objects.
|
static int |
doubleCompare(double arg1,
double arg2)
Compares two Double numeric object.
|
static BigDecimal |
minus(Object minuend,
Object subtrahend)
Returns the difference
BigDecimal whose value is (minuend - subtrahend). |
static Object |
plus(Object number,
int augend)
Returns a number
Object whose value is (number + augend), Note: This method
will throw ArithmeticException if number overflows. |
public static Object plus(Object number, int augend) throws ArithmeticException
Object whose value is (number + augend), Note: This method
will throw ArithmeticException if number overflows.public static BigDecimal minus(Object minuend, Object subtrahend)
BigDecimal whose value is (minuend - subtrahend).public static int compare(Object obj1, Object obj2)
0 if num1 is equal to the num2; a value less than
0 if the num1 is numerically less than the num2; and a value
greater than 0 if the num1 is numerically greater than the num2.ClassCastException - if the compared objects are not instance of Comparable or
not mutually comparable (for example, strings and integers).public static int doubleCompare(double arg1,
double arg2)
arg1 is numerically less than, equal to, or greater than
arg2.Copyright © 2024 The Apache Software Foundation. All rights reserved.