public class FormatHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SIGN_FLOATING_MINUS
Constant for the floating minus sign
|
static int |
SIGN_FLOATING_PLUS
Constant for floating plus sign
|
static int |
SIGN_MINUS
Constant for the minus sign
|
static int |
SIGN_NONE
Constant for no sign
|
static int |
SIGN_PLUS
Constant for plus sign
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getDatetimeFormat(String displayRule)
Convert datetime display rule to Java format.
|
static char |
getDecimalSeparator() |
static String |
getDisplayrule(int datatype,
String displayrule,
int displaylength,
int precision,
int scale)
Return a new display rule suitable for the given data type if the given
display rule is null or empty.
|
static char |
getGroupingSeparator() |
static Locale |
getLocale()
Return the
locale object. |
static String |
getNumericFormat(String displayRule)
Convert numeric display rule to an internal format
|
static String |
getNumericInputFormat(String displayFormat)
Get numeric input format
|
static int |
getSign(String displayRule)
Get sign code from a display rule
Five possible return values: SIGN_MINUS,SIGN_FLOARING_MINUS, SIGN_PLUS, SIGN_FLOATING_PLUS, SIGN_NONE |
static void |
setDecimalSeparator(char decimalSeparator) |
static void |
setGroupingSeparator(char groupingSeparator) |
static void |
setLocale(Locale locale) |
public static final int SIGN_FLOATING_MINUS
public static final int SIGN_MINUS
public static final int SIGN_NONE
public static final int SIGN_PLUS
public static final int SIGN_FLOATING_PLUS
public static String getNumericFormat(String displayRule)
displayRule - (missing javadoc)public static int getSign(String displayRule)
displayRule - (missing javadoc)public static String getNumericInputFormat(String displayFormat)
displayFormat - (missing javadoc)public static String getDatetimeFormat(String displayRule)
displayRule - (missing javadoc)public static String getDisplayrule(int datatype, String displayrule, int displaylength, int precision, int scale)
datatype - (missing javadoc)displayrule - (missing javadoc)displaylength - (missing javadoc)precision - (missing javadoc)scale - (missing javadoc)public static char getDecimalSeparator()
public static void setDecimalSeparator(char decimalSeparator)
decimalSeparator - the decimalSeparator to setpublic static char getGroupingSeparator()
public static void setGroupingSeparator(char groupingSeparator)
groupingSeparator - the groupSeparator to setpublic static Locale getLocale()
locale object. If none is set,
Locale.getDefault() will be used.public static void setLocale(Locale locale)
locale - the locale to setCopyright © 2006–2018 Esito AS. All rights reserved.