java.lang.String |
format(java.lang.String aString)
Methods inherited from class com.ibm.btt.base.FormatElement |
checkIndexes, exceptionInfo, externalizer, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, toTags, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryIntegerStringFormat
public BinaryIntegerStringFormat()
- This constructor creates a BinaryIntegerStringFormat object.
BinaryIntegerStringFormat
public BinaryIntegerStringFormat(java.lang.String aName)
throws java.io.IOException
- This constructor creates a new instance of the BinaryIntegerStringFormat class,
which is obtained from the external definition files through aName.
- Parameters:
aName - java.lang.String
- Throws:
java.io.IOException
format
public java.lang.String format(java.lang.String aString)
throws DSEInvalidArgumentException
- Converts the String to a long format and calls the super long format.
- Parameters:
aString - java.lang.String
- Returns:
- java.lang.String
- Throws:
DSEInvalidArgumentException
formatField
public java.lang.String formatField(DataField aDataField)
throws DSEInvalidArgumentException
- Provides access to the value of the DataField, converts it from a
String to an Integer, and checks that it is in a valid long format.
Delegates the long format to the super method long format.
- Overrides:
formatField in class IntegerFormat
- Parameters:
aDataField - DataField
- Returns:
- String
- Throws:
DSEInvalidArgumentException
getPadChar
public char getPadChar()
- Returns the value of padChar.
- Returns:
- char
getUnformatStringSize
public int getUnformatStringSize()
- Returns the unformatStringSize.
- Returns:
- int
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
- Initializes a BinaryIntegerStringFormat with the attributes in aTag
- Overrides:
initializeFrom in class IntegerFormat
- Parameters:
aTag - com.ibm.btt.base.Tag
- Returns:
- java.lang.Object
- Throws:
java.io.IOException
parseToString
public java.lang.String parseToString(java.lang.String aString)
throws DSEInvalidArgumentException
- Interprets the input string, obtains the long value from the aString
through the parent class, and converts the long value to a numeric string.
If required, it first adds the padChar to the left until it reaches
the size indicated by the attribute unformatedStringSize (size of the
unformatted string).
- Parameters:
aString - java.lang.String
- Returns:
- java.lang.String
- Throws:
DSEInvalidArgumentException
setPadChar
public void setPadChar(char aPadChar)
- Sets the value of padChar.
- Parameters:
aPadChar - char
setUnformatStringSize
public void setUnformatStringSize(int aSize)
- Sets the value of unformatStringSize.
- Parameters:
aSize - int
toString
public java.lang.String toString()
- Converts the IntegerFormat to a String. Default values are not concatenated.
- Overrides:
toString in class IntegerFormat
- Returns:
- java.lang.String
unformatField
public DataField unformatField(java.lang.String aString,
DataField aDataField)
throws DSEInvalidArgumentException
- Updates the DataField value by interpreting the input string. Obtains
the long value from aString through the parent class, converts the
long to a numeric string, and updates the value of aDataField. If
required, it first adds the padChar to the left until it reaches the size
indicated by the attribute unformatedStringSize (size of the
unformatted string).
- Overrides:
unformatField in class IntegerFormat
- Parameters:
aString - StringaDataField - DataField
- Returns:
- com.ibm.btt.base.DataField
- Throws:
DSEInvalidArgumentException
(c) Copyright IBM Corporation 1998, 2009
|