|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.FormatElement
com.ibm.btt.base.FieldFormat
com.ibm.btt.base.PackedFormat
@ATTR(value={"decPlaces#Integer#IMPLIED","signed#Boolean#IMPLIED"}) public class PackedFormat
This class formats a number as a String that represents the packed value of the number (a digit per 4 bits).
Field Summary |
---|
Fields inherited from class com.ibm.btt.base.FormatElement |
---|
dataElementName, externalizer, name |
Constructor Summary | |
---|---|
PackedFormat()
This is the default constructor used to create a PackedFormat object. |
|
PackedFormat(java.lang.String aName)
This is the constructor used by the externalizer to create a PackedFormat object. |
Method Summary | |
---|---|
protected java.lang.String |
basicFormat(long num)
Performs the conversion of num into a String. |
protected long |
basicParse(java.lang.String aString)
Interprets the String as a packed integer in which a digit is represented by four bits of a character. |
java.lang.String |
format(double value)
Formats a Double into a packed integer. |
java.lang.String |
format(long value)
Formats a long into a packed integer. |
java.lang.String |
formatField(DataField aDataField)
Accesses the value of the aDataField, checks it, and returns it as a packed decimal string representation with an EBCDIC sign such as "+" --> 0xc or "-" --> 0xd. |
int |
getDecimalPlaces()
Returns the value of decimalPlaces. |
boolean |
getSigned()
Returns the value of the signed attribute. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a PackedFormat with the aTag attributes. |
boolean |
isSigned()
Returns true if the data is to be formatted as signed. |
double |
parseToDouble(java.lang.String aString)
Unformats a String by interpreting it as a packed double. |
long |
parseToLong(java.lang.String aString)
Unformats a String by interpreting it as a packed integer. |
void |
setDecimalPlaces(int anInt)
Sets the value of decimalPlaces. |
void |
setSigned(boolean aBoolean)
Sets the value of signed. |
java.lang.String |
toString()
Returns a visual representation of this format. |
DataField |
unformatField(java.lang.String aString,
DataField aDataField)
Updates the value of the DataField by interpreting aString as a packed decimal string representation with an an EBCDIC sign such as "+" --> 0xc or "-" --> 0xd. |
Methods inherited from class com.ibm.btt.base.FieldFormat |
---|
format, format, toStrings, unformat, unformat, unformat |
Methods inherited from class com.ibm.btt.base.FormatElement |
---|
checkIndexes, exceptionInfo, externalizer, extract, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, 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 |
Constructor Detail |
---|
public PackedFormat()
public PackedFormat(java.lang.String aName) throws java.io.IOException
aName
- java.lang.String
java.io.IOException
Method Detail |
---|
protected java.lang.String basicFormat(long num) throws DSEInvalidArgumentException
num
- long
DSEInvalidArgumentException
protected long basicParse(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.String
DSEInvalidArgumentException
public java.lang.String format(double value) throws DSEInvalidArgumentException
value
- double
DSEInvalidArgumentException
public java.lang.String format(long value) throws DSEInvalidArgumentException
value
- long
DSEInvalidArgumentException
public java.lang.String formatField(DataField aDataField) throws DSEInvalidClassException, DSEInvalidArgumentException
formatField
in class FieldFormat
aDataField
- DataField
DSEInvalidClassException
DSEInvalidArgumentException
public int getDecimalPlaces()
public boolean getSigned()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in class FormatElement
aTag
- com.ibm.btt.base.Tag
java.io.IOException
public boolean isSigned()
public double parseToDouble(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.String
DSEInvalidArgumentException
public long parseToLong(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.String
DSEInvalidArgumentException
public void setDecimalPlaces(int anInt)
anInt
- intpublic void setSigned(boolean aBoolean)
aBoolean
- booleanpublic java.lang.String toString()
toString
in class FormatElement
public DataField unformatField(java.lang.String aString, DataField aDataField) throws DSEInvalidArgumentException
unformatField
in class FieldFormat
aString
- StringaDataField
- DataField
DSEInvalidArgumentException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |