|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.enterprise.util.NumberUtil
Provides some utility methods pertaining to numbers.
| Nested Class Summary | |
static class |
NumberUtil.Metric
Returned from method getMetric(java.lang.String) to describe a canonic number |
| Constructor Summary | |
NumberUtil()
|
|
| Method Summary | |
static void |
appendIntString(int i,
int minLen,
java.lang.StringBuffer toAppendTo)
Converts a nonnegative integer to a string, left-pads with zeros up to a given length and appends the result to a StringBuffer. |
static java.lang.String |
double2String(double d)
Converts a double to a fixed point number string using a point as decimal separation character (canonic format, see above). |
static NumberUtil.Metric |
getMetric(java.lang.String v)
Parses a provided number in the so called canonic number format and returns some information about it. |
static boolean |
isDigit(char ch)
Provides a fast but not locale independent implementation of numeric check. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NumberUtil()
| Method Detail |
public static NumberUtil.Metric getMetric(java.lang.String v)
v - the number. Must not be null.
public static boolean isDigit(char ch)
public static void appendIntString(int i,
int minLen,
java.lang.StringBuffer toAppendTo)
This method is performance optimized for small numbers, i.e., numbers less than 10000.
i - integer to be appended. Must not be negative.minLen - minimum length of appended zero praefixed stringtoAppendTo - StringBuffer where to append topublic static java.lang.String double2String(double d)
d - the input double
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||