at.spardat.enterprise.fmt
Class ABcdFmtPattern
java.lang.Object
at.spardat.enterprise.fmt.IFmt
at.spardat.enterprise.fmt.ABcdFmt
at.spardat.enterprise.fmt.ABcdFmtDefault
at.spardat.enterprise.fmt.ABcdFmtPattern
- All Implemented Interfaces:
- java.lang.Cloneable
- public class ABcdFmtPattern
- extends ABcdFmtDefault
In order to parse numbers, ABcdFmtDefault is used. But formatting is done
using java.text.DecimalFormat which allows to use patterns and has some
more capabilities than ABcdFmtDefault.
Warning: Numbers with more than 15 digits are not processed correctly since DecimalFormat
internally uses doubles.
- Author:
- YSD, 18.02.2004
|
Constructor Summary |
ABcdFmtPattern(java.lang.String pattern,
int maxBeforeC,
int maxAfterC,
int style,
java.util.Locale l)
Constructor |
|
Method Summary |
java.lang.String |
format(java.lang.String internal)
Transforms an internal encoding to an external. |
| Methods inherited from class at.spardat.enterprise.fmt.ABcdFmtDefault |
format, getMaxAfterC, getMaxBeforeC, isLegalExternalChar, isLegalInternal, isOneWay, maxLenOfExternal, parse, parse, set, setMaxAfterC, setMaxBeforeC, setStyle |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ABcdFmtPattern
public ABcdFmtPattern(java.lang.String pattern,
int maxBeforeC,
int maxAfterC,
int style,
java.util.Locale l)
- Constructor
- Parameters:
pattern - as defined in java.text.DecimalFormatmaxBeforeC - max number of digits before the comma or -1 if unrestricted. Must not be zero.maxAfterC - max number of digits after the comma or -1 if unrestrictedstyle - may be DEFAULT, MANDATORY, NO_THOUS_SEPS, THOUS_SEPS, NO_NEG or ROUND_FRACTION.
Either NO_THOUS_SEPS or THOUS_SEPS may be specified.l - a Locale
format
public java.lang.String format(java.lang.String internal)
- Description copied from class:
IFmt
- Transforms an internal encoding to an external.
- Overrides:
format in class ABcdFmtDefault
- See Also:
IFmt.format(java.lang.String)