java.lang.String |
addDecoration(java.lang.String aString)
Methods inherited from class com.ibm.btt.base.FormatDecorator |
format, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat, unformat |
Methods inherited from class com.ibm.btt.base.FormatElement |
checkIndexes, exceptionInfo, externalizer, getExternalizer, getTagName, isCacheable, isNull, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, setSize, toTags, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
delimiterChar
public char delimiterChar
- This character is used as as the delimiter.
Delimiter
public Delimiter()
- This constructor creates a Delimiter object.
Delimiter
public Delimiter(java.lang.String aName)
throws java.io.IOException
- This constructor creates the Delimiter object with the id aName
- Parameters:
aName - java.lang.String
- Throws:
java.io.IOException
addDecoration
public java.lang.String addDecoration(java.lang.String aString)
- Appends the delimiter character to the end of the string.
- Specified by:
addDecoration in class FormatDecorator
extract
public java.lang.String[] extract(java.lang.String aString)
throws DSEInvalidArgumentException
- Extracts the string up to the first occurrence of the delimiter.
- Overrides:
extract in class FormatDecorator
- Parameters:
aString - String
- Returns:
- java.lang.String[]
- Throws:
DSEInvalidArgumentException
getDelimiterChar
public char getDelimiterChar()
- Returns the value of the delimiterChar.
- Returns:
- char
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
- Initializes a Delimiter with the Tag attributes.
- Specified by:
initializeFrom in class FormatElement
- Parameters:
aTag - com.ibm.btt.base.Tag
- Returns:
- java.lang.Object
removeDecoration
public java.lang.String removeDecoration(java.lang.String aString)
throws DSEInvalidArgumentException
- Remove the delimiter character from the end of the string.
- Specified by:
removeDecoration in class FormatDecorator
- Parameters:
aString - String
- Returns:
- java.lang.String
- Throws:
DSEInvalidArgumentException
setDelimiterChar
public void setDelimiterChar(char aChar)
- Sets the value of the delimiterChar.
- Parameters:
aChar - char
toStrings
public Vector toStrings()
- Returns a visual representation of this decorator.
- Specified by:
toStrings in class FormatDecorator
- Returns:
- java.lang.String
unformat
public int unformat(int ndxFrom,
int ndxTo,
java.lang.String aString,
DataElement aDataElement)
throws DSEInvalidRequestException,
DSEInvalidArgumentException
- Unformat strings that between ndxFrom and ndxTo into the DataElement.
- Overrides:
unformat in class FormatElement
- Parameters:
str - java.lang.StringndxFrom - intndxTo - intde - com.ibm.btt.base.DataElement;
- Returns:
- int
- Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
unformat
public int unformat(int ndxFrom,
int ndxTo,
java.lang.String aString,
Context ctx)
throws DSEInvalidRequestException,
DSEInvalidArgumentException
- Unformat strings that between ndxFrom and ndxTo into the Context.
- Overrides:
unformat in class FormatElement
- Parameters:
str - java.lang.StringndxFrom - intndxTo - intctx - com.ibm.btt.base.Context;
- Returns:
- int
- Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
getNdxTo
protected int getNdxTo(int ndxFrom,
int ndxTo,
java.lang.String str)
throws DSEInvalidArgumentException
- Returns first position that delimiter in the string that between ndxFrom
and ndxTo
- Parameters:
str - java.lang.StringndxFrom - intndxTo - int
- Returns:
- int
- Throws:
DSEInvalidArgumentException
(c) Copyright IBM Corporation 1998, 2009
|