java.lang.String[] |
extract(java.lang.String aString)
Methods inherited from class com.ibm.btt.base.FormatElement |
checkIndexes, exceptionInfo, externalizer, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
constantValue
java.lang.String constantValue
ConstantFormat
public ConstantFormat()
- This constructor creates a ConstantFormat object.
ConstantFormat
public ConstantFormat(java.lang.String aName)
throws java.io.IOException
- This constructor creates a new instance of the ConstantFormat class,
which is obtained from the external definition files through aName.
- Parameters:
aName - java.lang.String
- Throws:
java.io.IOException
extract
public java.lang.String[] extract(java.lang.String aString)
- Extracts the length that is equal to the constantValue length.
- Overrides:
extract in class FormatElement
- Parameters:
aString - String
- Returns:
- String[]
format
public java.lang.String format(DataElement aDataElement)
- Returns the constantValue.
- Specified by:
format in class FormatElement
- Parameters:
aDataElement - DataElement
- Returns:
- String
getConstantValue
public java.lang.String getConstantValue()
- Gets the constantValue property (java.lang.String) value.
- Returns:
- - The constantValue value
- See Also:
setConstantValue(java.lang.String)
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
- Initializes a ConstantFormat with the aTag attributes.
- Specified by:
initializeFrom in class FormatElement
- Parameters:
aTag - com.ibm.btt.base.Tag
- Returns:
- java.lang.Object
- Throws:
java.io.IOException
isItConstant
public boolean isItConstant()
- Returns true.
- Overrides:
isItConstant in class FormatElement
- Returns:
- Boolean
setConstantValue
public void setConstantValue(java.lang.String aConstantValue)
- Sets the constantValue property (java.lang.String) value.
- Parameters:
aConstantValue - - The new value for the property- See Also:
getConstantValue()
toString
public java.lang.String toString()
- Returns a visual representation of the instance.
- Overrides:
toString in class FormatElement
- Returns:
- java.lang.String
toStrings
public Vector toStrings()
- Returns a visual representation of this format element.
- Overrides:
toStrings in class FormatElement
- Returns:
- com.ibm.btt.base.Vector
unformat
public DataElement unformat(java.lang.String aString,
DataElement aDataElement)
throws DSEInvalidArgumentException
- Verifies that the String is equal to the constantValue and, if it is not,
it throws an Exception.
- Specified by:
unformat in class FormatElement
- Throws:
DSEInvalidArgumentException
unformat
public int unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
DataElement aDataElement)
throws DSEInvalidRequestException,
DSEInvalidArgumentException
- Get the next index
- Overrides:
unformat in class FormatElement
- Parameters:
ndxFrom - - the initial indexndxTo - - the final indexstr - - the string will be unformatedaDataElement - - the dataelement
- Returns:
- int
- Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
unformat
public int unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
Context aDataElement)
throws DSEInvalidRequestException,
DSEInvalidArgumentException
- Get the next index
- Overrides:
unformat in class FormatElement
- Parameters:
ndxFrom - - the initial indexndxTo - - the final indexstr - - the string will be unformatedaDataElement - - the context
- Returns:
- int
- Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
(c) Copyright IBM Corporation 1998, 2009
|