|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.common.Numbers
public final class Numbers
A set of utlities around numbers.
Method Summary | |
---|---|
static double |
bytesToDouble(byte[] arr)
Converts a byte array to double. |
static float |
bytesToFloat(byte[] arr)
Converts a byte array to float. |
static int |
bytesToInt(byte[] arr)
Converts a byte array to an int. |
static long |
bytesToLong(byte[] arr)
Converts a byte array to a long. |
static short |
bytesToShort(byte[] arr)
Converts a byte array to an short. |
static byte[] |
doubleToBytes(double val)
Converts a double to a byte array. |
static byte[] |
floatToBytes(float val)
Converts a float to a byte array. |
static byte[] |
intToBytes(int val)
Converts an int to a byte array. |
static byte[] |
longToBytes(long val)
Converts a long to a byte array. |
static byte[] |
shortToBytes(int val)
Converts an int to a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static short bytesToShort(byte[] arr)
arr
- The byte array to convert to an short
public static int bytesToInt(byte[] arr)
arr
- The byte array to convert to an int
public static long bytesToLong(byte[] arr)
arr
- The byte array to convert to a long
public static float bytesToFloat(byte[] arr)
arr
- The byte array to convert to a float
public static double bytesToDouble(byte[] arr)
arr
- The byte array to convert to a double
public static byte[] intToBytes(int val)
val
- The int to convert to a byte array
public static byte[] shortToBytes(int val)
val
- The int to convert to a byte array
public static byte[] longToBytes(long val)
val
- The long to convert to a byte array
public static byte[] floatToBytes(float val)
val
- The float to convert to a byte array
public static byte[] doubleToBytes(double val)
val
- The double to convert to a byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |