Package org.apache.solr.util
Class NumberUtils
- java.lang.Object
-
- org.apache.solr.util.NumberUtils
-
public class NumberUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description NumberUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
bytesToInt(byte[] bytes)
static String
double2sortableStr(double val)
static String
double2sortableStr(String val)
static String
float2sortableStr(float val)
static String
float2sortableStr(String val)
static String
int2sortableStr(int val)
static int
int2sortableStr(int val, char[] out, int offset)
static String
int2sortableStr(String val)
static byte[]
intToBytes(int val)
static String
long2sortableStr(long val)
static int
long2sortableStr(long val, char[] out, int offset)
static String
long2sortableStr(String val)
static String
readableSize(long size)
static double
SortableStr2double(String val)
static double
SortableStr2double(org.apache.lucene.util.BytesRef val)
static String
SortableStr2doubleStr(String val)
static float
SortableStr2float(String val)
static float
SortableStr2float(org.apache.lucene.util.BytesRef val)
static String
SortableStr2floatStr(String val)
static String
SortableStr2int(String val)
static int
SortableStr2int(String sval, int offset, int len)
static String
SortableStr2int(org.apache.lucene.util.BytesRef val)
static int
SortableStr2int(org.apache.lucene.util.BytesRef sval, int offset, int len)
static String
SortableStr2long(String val)
static long
SortableStr2long(String sval, int offset, int len)
static String
SortableStr2long(org.apache.lucene.util.BytesRef val)
static long
SortableStr2long(org.apache.lucene.util.BytesRef sval, int offset, int len)
-
-
-
Method Detail
-
readableSize
public static String readableSize(long size)
-
int2sortableStr
public static String int2sortableStr(int val)
-
SortableStr2int
public static String SortableStr2int(org.apache.lucene.util.BytesRef val)
-
long2sortableStr
public static String long2sortableStr(long val)
-
SortableStr2long
public static String SortableStr2long(org.apache.lucene.util.BytesRef val)
-
float2sortableStr
public static String float2sortableStr(float val)
-
SortableStr2float
public static float SortableStr2float(String val)
-
SortableStr2float
public static float SortableStr2float(org.apache.lucene.util.BytesRef val)
-
double2sortableStr
public static String double2sortableStr(double val)
-
SortableStr2double
public static double SortableStr2double(String val)
-
SortableStr2double
public static double SortableStr2double(org.apache.lucene.util.BytesRef val)
-
int2sortableStr
public static int int2sortableStr(int val, char[] out, int offset)
-
SortableStr2int
public static int SortableStr2int(String sval, int offset, int len)
-
SortableStr2int
public static int SortableStr2int(org.apache.lucene.util.BytesRef sval, int offset, int len)
-
long2sortableStr
public static int long2sortableStr(long val, char[] out, int offset)
-
SortableStr2long
public static long SortableStr2long(String sval, int offset, int len)
-
SortableStr2long
public static long SortableStr2long(org.apache.lucene.util.BytesRef sval, int offset, int len)
-
intToBytes
public static byte[] intToBytes(int val)
-
bytesToInt
public static int bytesToInt(byte[] bytes)
-
-