类 ObjectUtils


  • public class ObjectUtils
    extends Object
    • 构造器详细资料

      • ObjectUtils

        public ObjectUtils()
    • 方法详细资料

      • minus

        public static BigDecimal minus​(Object minuend,
                                       Object subtrahend)
        Returns the difference BigDecimal whose value is (minuend - subtrahend).
      • compare

        public static int compare​(Object obj1,
                                  Object obj2)
        Compares two comparable objects.
        返回:
        The value 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).
      • doubleCompare

        public static int doubleCompare​(double arg1,
                                        double arg2)
        Compares two Double numeric object.
        返回:
        -1, 0, or 1 as this arg1 is numerically less than, equal to, or greater than arg2.