|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.enterprise.fmt.IFmt
at.spardat.enterprise.fmt.AStringFmt
at.spardat.enterprise.fmt.AStringFmtRange
This class defines a formatter which accepts characters from character ranges. Since the regexp implementation is not yet available in JDKs less than 1.4, we use a simple implementation here.
Character ranges are specified as string. The characters in the string are either the allowed character themselves, or lower and upper character separated by an hypen. Note that for these ranges to work you must know the Unicode table and what characters are included between particular upper and lower characters. Some examples:
ABCDEF denotes the characters A through F A-F the same as before a-fA-F denotes the character set abcdefABCDEF 1a-f denotes 1abcdef a-zA-Z0-9 denotes the letters a through z, case insensitive and digits ]- denotes the character '-'. A ']' is used to escape the '-'. ]] denotes the character ']'. A ']' is used to escape itself. ]t horizontal tab,'\u0009']n new line,'\u000A']f form feed,'\u000C']r carriage return,'\u000D'
| Field Summary | |
static java.lang.String |
DIGITS
Range string denoting the digits 0-9 |
static java.lang.String |
INA
Range string denoting characters which may be safely transmitted over INA/ACNS to z/OS |
| Fields inherited from class at.spardat.enterprise.fmt.AStringFmt |
LOWER_CASE, MAX_MAX_LEN, UPPER_CASE |
| Fields inherited from class at.spardat.enterprise.fmt.IFmt |
DEFAULT, LAST_STYLE, MANDATORY, style_ |
| Constructor Summary | |
AStringFmtRange(int maxLen,
java.lang.String range)
Constructs a String range formatter. |
|
AStringFmtRange(int maxLen,
java.lang.String range,
int style)
Constructs a String range formatter. |
|
| Method Summary | |
protected int |
getNumRanges()
|
boolean |
isLegalExternalChar(char aChar)
Examines whether a given character may be part of an external representation. |
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.AStringFmt |
format, getInstance, getInstance, getInstance, getInstance, getInstance, getMaxLen, getMinLen, isOneWay, maxLenOfExternal, mayBeAppliedTo, parse2, setMaxLen, setMinLen |
| 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 |
| Field Detail |
public static final java.lang.String DIGITS
public static final java.lang.String INA
| Constructor Detail |
public AStringFmtRange(int maxLen,
java.lang.String range)
maxLen - the maximum length; -1 if unlimited;range - a range specification as defined in the class description above.
public AStringFmtRange(int maxLen,
java.lang.String range,
int style)
maxLen - the maximum length; -1 if unlimited;range - a range specification as defined in the class description above.style - may be MANDATORY| Method Detail |
public boolean isLegalExternalChar(char aChar)
IFmt
isLegalExternalChar in class AStringFmtIFmt.isLegalExternalChar(char)public boolean isLegalInternal(java.lang.String internal)
IFmt
isLegalInternal in class AStringFmtIFmt.isLegalInternal(String)
public java.lang.String parse(java.lang.String external)
throws FmtParseException
IFmt
parse in class AStringFmtFmtParseExceptionIFmt.parse(String)protected int getNumRanges()
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||