Class NumericUtils

java.lang.Object
software.amazon.awssdk.utils.NumericUtils

public final class NumericUtils extends Object
  • Method Details

    • saturatedCast

      public static int saturatedCast(long value)
      Returns the int nearest in value to value.
      Parameters:
      value - any long value
      Returns:
      the same value cast to int if it is in the range of the int type, Integer.MAX_VALUE if it is too large, or Integer.MIN_VALUE if it is too small
    • min

      public static Duration min(Duration a, Duration b)
    • max

      public static Duration max(Duration a, Duration b)