Package org.atlanmod.commons.primitive
Class Floats
- java.lang.Object
-
- org.atlanmod.commons.primitive.Floats
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]toBytes(float value)Encodes afloatto abytearray.static byte[]toBytes(Float value)Encodes aFloatto abytearray.
-
-
-
Method Detail
-
toBytes
@Nonnull public static byte[] toBytes(float value)
Encodes afloatto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - See Also:
Ints.toBytes(int),Float.floatToIntBits(float)
-
toBytes
@Nonnull public static byte[] toBytes(Float value)
Encodes aFloatto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - Throws:
NullPointerException- if thevalueisnull
-
-