Class NumberUtility

java.lang.Object
com.scriptbasic.utility.NumberUtility

public class NumberUtility extends Object
Utility class to compare Number variables, Long or Double.
Author:
Peter Verhas date Jul 21, 2012
  • Method Details

    • isPositive

      public static boolean isPositive(Number a)
    • compare

      public static int compare(Number a, Number b)
      Compares the numbers a and b.
      Parameters:
      a - one of the numbers
      b - the other number
      Returns:
      0 if a == b; 1 if a > b; and -1 if b < a