com.ibm.dse.services.formsprint
Class FormsConstantFormat
java.lang.Object
|
+--com.ibm.dse.base.FormatElement
|
+--com.ibm.dse.base.ConstantFormat
|
+--com.ibm.dse.services.formsprint.FormsConstantFormat
- public class FormsConstantFormat
- extends ConstantFormat
The FormsConstantFormat class is an extension of the ConstantFormat that adds a new line to the beginning of
the constant value.
- See Also:
- Serialized Form
Constructor Summary |
FormsConstantFormat()
This constructor creates a FormsConstantFormat object. |
FormsConstantFormat(java.lang.String aName)
This constructor creates a FormsConstantFormat object. |
Method Summary |
java.lang.String[] |
extract(java.lang.String aString)
Extracts the length that is equal to the constantValue length (plus 1 for the new line character). |
java.lang.String |
format(DataElement aDataElement)
Returns the constantValue with a new line appended at the beginning. |
DataElement |
unformat(java.lang.String aString,
DataElement aDataElement)
Verifies that the String is equal to the constantValue (skipping the first character). |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
format,
format,
getDataElementName,
getExternalizer,
getName,
getTagName,
isCacheable,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
rootDecorated,
setDataElementName,
setExternalizer,
setName,
setSize,
toStrings,
toTags,
unformat,
unformat,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
FormsConstantFormat
public FormsConstantFormat()
- This constructor creates a FormsConstantFormat object.
FormsConstantFormat
public FormsConstantFormat(java.lang.String aName)
throws java.io.IOException
- This constructor creates a FormsConstantFormat object.
- Parameters:
aName
- java.lang.String, the value for the name attribute of FormatElement- Throws:
- java.io.IOException -
extract
public java.lang.String[] extract(java.lang.String aString)
- Extracts the length that is equal to the constantValue length (plus 1 for the new line character).
- Overrides:
- extract in class ConstantFormat
- Parameters:
String
- aString, a string which contains formated strings- Returns:
- String[] - the first element is the part of the provided string that the format is able to unformat
and the second is the rest of the provided string.
format
public java.lang.String format(DataElement aDataElement)
- Returns the constantValue with a new line appended at the beginning.
- Overrides:
- format in class ConstantFormat
- Parameters:
aDataElement
- DataElement, is not utilized- Returns:
- java.lang.String - the formated string
unformat
public DataElement unformat(java.lang.String aString,
DataElement aDataElement)
throws DSEInvalidArgumentException
- Verifies that the String is equal to the constantValue (skipping the first character). If it is not,
it throws an exception.
- Overrides:
- unformat in class ConstantFormat
- Parameters:
aString
- java.lang.String, the formated stringaDataElement
- DataElement, to obtain information when the method throws an exception- Returns:
- DataElement - the original DataElement passed in the second parameter
- Throws:
- DSEInvalidArgumentException -