Package software.amazon.awssdk.utils
Class NumericUtils
- java.lang.Object
-
- software.amazon.awssdk.utils.NumericUtils
-
public final class NumericUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Duration
max(Duration a, Duration b)
static Duration
min(Duration a, Duration b)
static int
saturatedCast(long value)
Returns theint
nearest in value tovalue
.
-
-
-
Method Detail
-
saturatedCast
public static int saturatedCast(long value)
Returns theint
nearest in value tovalue
.- Parameters:
value
- anylong
value- Returns:
- the same value cast to
int
if it is in the range of theint
type,Integer.MAX_VALUE
if it is too large, orInteger.MIN_VALUE
if it is too small
-
-