IMC Epclient 5.0.3

at.spardat.enterprise.fmt
Class ABcdFmtRange

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.ABcdFmtRange
All Implemented Interfaces:
java.lang.Cloneable

public class ABcdFmtRange
extends ABcdFmtDefault

Extends ABcdFmt to allow restricting the number range by providing an upper and lower limit.


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
ABcdFmtRange(int maxBeforeC, int maxAfterC, int style, double minVal, double maxVal, java.util.Locale l)
          Constructs the format object.
 
Method Summary
 double getMaxValue()
          Returns the largest value accepted.
 double getMinValue()
          Returns the smallest value accepted.
 boolean isLegalInternal(java.lang.String internal)
          Determines if the given string is a legal internal representation.
 java.lang.String parse(java.lang.String external)
          Tries to transform an external encoding to an internal.
 
Methods inherited from class at.spardat.enterprise.fmt.ABcdFmtDefault
format, format, getMaxAfterC, getMaxBeforeC, isLegalExternalChar, isOneWay, maxLenOfExternal, 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

ABcdFmtRange

public ABcdFmtRange(int maxBeforeC,
                    int maxAfterC,
                    int style,
                    double minVal,
                    double maxVal,
                    java.util.Locale l)
Constructs the format object.

Parameters:
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, NO_THOUS_SEPS, THOUS_SEPS or NO_NEG. Either NO_THOUS_SEPS or THOUS_SEPS may be specified.
minVal - the smallest value accepted
maxVal - the largest value accepted
l - the Locale. Must not be null.
Method Detail

parse

public java.lang.String parse(java.lang.String external)
                       throws AParseException
Description copied from class: IFmt
Tries to transform an external encoding to an internal. Must not be called if isOneWay() yields true.

Overrides:
parse in class ABcdFmtDefault
Throws:
AParseException
See Also:
IFmt.parse(String)

isLegalInternal

public boolean isLegalInternal(java.lang.String internal)
Description copied from class: IFmt
Determines if the given string is a legal internal representation.

Overrides:
isLegalInternal in class ABcdFmtDefault
See Also:
IFmt.isLegalInternal(String)

getMinValue

public double getMinValue()
Returns the smallest value accepted.


getMaxValue

public double getMaxValue()
Returns the largest value accepted.


IMC Epclient 5.0.3