Package org.atlanmod.commons.primitive
Class Doubles
- java.lang.Object
-
- org.atlanmod.commons.primitive.Doubles
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]toBytes(double value)Encodes adoubleto abytearray.static byte[]toBytes(Double value)Encodes aDoubleto abytearray.
-
-
-
Method Detail
-
toBytes
@Nonnull public static byte[] toBytes(double value)
Encodes adoubleto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - See Also:
Longs.toBytes(long),Double.doubleToLongBits(double)
-
toBytes
@Nonnull public static byte[] toBytes(Double value)
Encodes aDoubleto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - Throws:
NullPointerException- if thevalueisnull
-
-