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 byte[]longToByte(Long input)Converts a long to a byte arraystatic Durationmax(Duration a, Duration b)static Durationmin(Duration a, Duration b)static intsaturatedCast(long value)Returns theintnearest in value tovalue.
-
-
-
Method Detail
-
saturatedCast
public static int saturatedCast(long value)
Returns theintnearest in value tovalue.- Parameters:
value- anylongvalue- Returns:
- the same value cast to
intif it is in the range of theinttype,Integer.MAX_VALUEif it is too large, orInteger.MIN_VALUEif it is too small
-
longToByte
public static byte[] longToByte(Long input)
Converts a long to a byte array
-
-