Class SafeOperations

java.lang.Object
org.apache.commons.imaging.internal.SafeOperations

public final class SafeOperations extends Object
Provides safe arithmetic operations to avoid, for example, numeric overflows.
Since:
1.0-alpha4
  • Method Details

    • add

      public static int add(int... values)
      Applies Math.addExact(int, int) to a variable length array of integers.
      Parameters:
      values - variable length array of integers.
      Returns:
      the values safely added.