|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.FormatElement | +--com.ibm.dse.base.FieldFormat | +--com.ibm.dse.base.PackedFormat
This class formats a number as a String that represents the packed value of the number (a digit per 4 bits).
Fields inherited from class com.ibm.dse.base.FormatElement |
dataElementName,
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.dse.base.FieldFormat |
format,
format,
unformat,
unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
extract,
format,
getDataElementName,
getExternalizer,
getName,
getTagName,
isCacheable,
isConstant,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
rootDecorated,
setDataElementName,
setExternalizer,
setName,
setSize,
toStrings,
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.StringMethod Detail |
protected java.lang.String basicFormat(long num) throws DSEInvalidArgumentException
num
- longprotected long basicParse(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.Stringpublic java.lang.String format(double value) throws DSEInvalidArgumentException
value
- doublepublic java.lang.String format(long value) throws DSEInvalidArgumentException
value
- longpublic java.lang.String formatField(DataField aDataField) throws DSEInvalidClassException, DSEInvalidArgumentException
aDataField
- DataFieldpublic int getDecimalPlaces()
public boolean getSigned()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
aTag
- com.ibm.dse.base.Tagpublic boolean isSigned()
public double parseToDouble(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.Stringpublic long parseToLong(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.Stringpublic void setDecimalPlaces(int anInt)
anInt
- intpublic void setSigned(boolean aBoolean)
aBoolean
- booleanpublic java.lang.String toString()
public DataField unformatField(java.lang.String aString, DataField aDataField) throws DSEInvalidArgumentException
aString
- StringaDataField
- DataField
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |