|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.util.Converter
public final class Converter
Some data converter utilities.
Constructor Summary | |
---|---|
Converter()
|
Method Summary | |
---|---|
static java.lang.String |
formatBoolean(boolean value)
|
static java.lang.String |
formatBoolean(boolean value,
java.util.Locale locale)
|
static java.lang.String |
formatDecimal(double d)
|
static java.lang.String |
formatDecimal(double d,
java.util.Locale locale)
|
static java.lang.String |
formatDecimal(double d,
java.lang.String format)
|
static java.lang.String |
formatDecimal(double d,
java.lang.String format,
java.lang.String emptyFormat)
|
static java.lang.String |
formatDecimal(double d,
java.lang.String format,
java.lang.String emptyFormat,
java.util.Locale loc)
|
static java.lang.String |
formatInteger(long l)
|
static java.lang.String |
formatInteger(long l,
java.util.Locale locale)
|
static java.lang.String |
formatInteger(long l,
java.lang.String format)
|
static java.lang.String |
formatInteger(long l,
java.lang.String format,
java.lang.String emptyFormat)
|
static java.lang.String |
formatInteger(long l,
java.lang.String format,
java.lang.String emptyFormat,
java.util.Locale loc)
|
static char |
getDecimalSeparator(java.util.Locale loc)
Returns the decimal separator in this locale. |
static char |
getGroupingSeparator(java.util.Locale loc)
Returns the grouping separator (to separate every 3 digits in integer part of a number) in this locale. |
static java.util.Locale |
getJVMLocale()
Returns the default locale of the JVM. |
static java.util.TimeZone |
getJVMTimeZone()
Returns the default time zone of the JVM. |
static boolean |
parseBoolean(java.lang.String value)
|
static boolean |
parseBooleanLocale(java.lang.String value)
|
static boolean |
parseBooleanLocale(java.lang.String value,
java.util.Locale locale)
|
static double |
parseDecimal(java.lang.String src)
|
static double |
parseDecimal(java.lang.String src,
java.util.Locale loc)
|
static double |
parseFloatWithDecimalSeparatorTolerance(java.lang.String doubleString,
java.util.Locale loc)
|
static long |
parseInteger(java.lang.String src)
|
static long |
parseInteger(java.lang.String src,
java.util.Locale loc)
|
static java.lang.String |
removeThousandSeparator(java.lang.String doubleString,
java.util.Locale loc)
If a decimal number contains thousand separator (example : a coma in US), they are removed, so that the string can be correctly interpreted by Double.parseDouble |
static java.lang.String |
replaceCommaByPoint(java.lang.String doubleString,
java.util.Locale loc)
If a decimal number contains a comma and no point, and if the given locale uses a comma for decimal separator, the comma is replaced by a point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Converter()
Method Detail |
---|
public static char getDecimalSeparator(java.util.Locale loc)
public static char getGroupingSeparator(java.util.Locale loc)
public static java.util.Locale getJVMLocale()
public static java.util.TimeZone getJVMTimeZone()
public static long parseInteger(java.lang.String src)
public static long parseInteger(java.lang.String src, java.util.Locale loc) throws java.text.ParseException
java.text.ParseException
public static java.lang.String formatInteger(long l)
public static java.lang.String formatInteger(long l, java.lang.String format)
public static java.lang.String formatInteger(long l, java.util.Locale locale)
public static java.lang.String formatInteger(long l, java.lang.String format, java.lang.String emptyFormat)
public static java.lang.String formatInteger(long l, java.lang.String format, java.lang.String emptyFormat, java.util.Locale loc)
public static double parseDecimal(java.lang.String src)
public static double parseDecimal(java.lang.String src, java.util.Locale loc) throws java.text.ParseException
java.text.ParseException
public static double parseFloatWithDecimalSeparatorTolerance(java.lang.String doubleString, java.util.Locale loc)
public static java.lang.String replaceCommaByPoint(java.lang.String doubleString, java.util.Locale loc)
public static java.lang.String removeThousandSeparator(java.lang.String doubleString, java.util.Locale loc)
public static java.lang.String formatDecimal(double d)
public static java.lang.String formatDecimal(double d, java.util.Locale locale)
public static java.lang.String formatDecimal(double d, java.lang.String format)
public static java.lang.String formatDecimal(double d, java.lang.String format, java.lang.String emptyFormat)
public static java.lang.String formatDecimal(double d, java.lang.String format, java.lang.String emptyFormat, java.util.Locale loc)
public static java.lang.String formatBoolean(boolean value)
public static java.lang.String formatBoolean(boolean value, java.util.Locale locale)
public static boolean parseBoolean(java.lang.String value)
public static boolean parseBooleanLocale(java.lang.String value)
public static boolean parseBooleanLocale(java.lang.String value, java.util.Locale locale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |