|
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
IFmt objects are responsible for converting an internal string encoding of a particular AtomicAttrVal type to an UI encoding and vice versa.
| Field Summary | |
static int |
DEFAULT
May be used in subclasses where ever a style is needed. |
static int |
LAST_STYLE
For subclasses which should start their style numbering at LAST_STYLE*2; |
static int |
MANDATORY
Used to express that any provided external input must not be empty. |
protected int |
style_
Style-field that may also be used by subclasses. |
| Constructor Summary | |
IFmt()
|
|
| Method Summary | |
void |
checkMandatory(java.lang.String internal)
Utility method to check a provided String for emptyness if the MANDATORY style is present. |
java.lang.Object |
clone()
Returns a clone of this; |
abstract java.lang.String |
format(java.lang.String internal)
Transforms an internal encoding to an external. |
int |
getStyle()
Returns the style-property. |
abstract boolean |
isLegalExternalChar(char aChar)
Examines whether a given character may be part of an external representation. |
abstract boolean |
isLegalInternal(java.lang.String internal)
Determines if the given string is a legal internal representation. |
boolean |
isMandatory()
Returns true, if this formatter only accepts non-empty input. |
abstract boolean |
isOneWay()
An IFmt is one way, if the external encoding may be generated out of the internal, but not vice versa. |
abstract int |
maxLenOfExternal()
Returns the maximum length an external string representation may have. |
abstract boolean |
mayBeAppliedTo(byte type)
Defines if this formatter is able to successfully format a specified type. |
abstract java.lang.String |
parse(java.lang.String external)
Tries to transform an external encoding to an internal. |
void |
setMandatory(boolean what)
Sets the mandatory-property to the provided value. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT
public static final int MANDATORY
public static final int LAST_STYLE
protected int style_
| Constructor Detail |
public IFmt()
| Method Detail |
public abstract java.lang.String parse(java.lang.String external)
throws AParseException
external - the external encoding
AParseException - if the external encoding cannot be successfully parsed.public abstract java.lang.String format(java.lang.String internal)
internal - the provided internal encoding. This String must satisfy the
condition isLegalInternal(), otherwise the behaviour of this
method is undefined.
public abstract int maxLenOfExternal()
public abstract boolean isLegalExternalChar(char aChar)
aChar - the character to check
public abstract boolean isLegalInternal(java.lang.String internal)
internal - the internal encoding.
public abstract boolean isOneWay()
public abstract boolean mayBeAppliedTo(byte type)
type - a type constant defined in Types.public boolean isMandatory()
public void setMandatory(boolean what)
public int getStyle()
public void checkMandatory(java.lang.String internal)
throws AParseException
AParseException - if isMandatory() and the provided String
is either null or empty.public java.lang.Object clone()
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||