IMC Epclient 5.0.3

at.spardat.enterprise.fmt
Class ABcdFmtPattern

java.lang.Object
  extended byat.spardat.enterprise.fmt.IFmt
      extended byat.spardat.enterprise.fmt.ABcdFmt
          extended byat.spardat.enterprise.fmt.ABcdFmtDefault
              extended byat.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

Field Summary
 
Fields inherited from class at.spardat.enterprise.fmt.ABcdFmtDefault
NK_ERROR, NK_TRUNC
 
Fields inherited from class at.spardat.enterprise.fmt.ABcdFmt
NO_NEG, NO_THOUS_SEPS, ROUND_FRACTION, SUPPRESS_ZERO, THOUS_SEPS
 
Fields inherited from class at.spardat.enterprise.fmt.IFmt
DEFAULT, LAST_STYLE, MANDATORY, style_
 
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 at.spardat.enterprise.fmt.ABcdFmt
getInstance, getInstance, getInstance, mayBeAppliedTo
 
Methods inherited from class at.spardat.enterprise.fmt.IFmt
checkMandatory, clone, getStyle, isMandatory, setMandatory
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.DecimalFormat
maxBeforeC - 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 unrestricted
style - 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
Method Detail

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)

IMC Epclient 5.0.3