Class NumberUtils


  • public class NumberUtils
    extends Object
    • Constructor Detail

      • NumberUtils

        public NumberUtils()
    • Method Detail

      • isAddOverflow

        public static boolean isAddOverflow​(long op1,
                                            long op2,
                                            long result)
        Checks if an addition of 2 longs caused an overflow
        Parameters:
        op1 -
        op2 -
        result -
        Returns:
        true if an overflow occurred, false otherwise