Package org.apache.commons.imaging.internal

# 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.0-alpha4

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `add(int... values)`
  Applies `Math.addExact(int, int)` to a variable length array of integers.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.