|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.FormatElement
com.ibm.dse.base.FieldFormat
com.ibm.dse.base.FloatFormat
This class formats a Float or a Double into the String used as its internal byte-representation. The size of its representation is float (4 bytes) or double precision (8 bytes). You can set attributes to have it return the data field in big-endian (host) or little-endian (PC) byte ordering.
Field Summary |
---|
Fields inherited from class com.ibm.dse.base.FormatElement |
---|
dataElementName, externalizer, name |
Constructor Summary | |
---|---|
FloatFormat()
This is the default constructor used to create a FloatFormat object. |
|
FloatFormat(java.lang.String aName)
This is the constructor used by the Externalizer to create a FloatFormat object. |
Method Summary | |
---|---|
java.lang.String[] |
extract(java.lang.String aString)
Extracts (strips) the substring corresponding to the format element from the input String and returns it and the remaining String as the elements of an array. |
java.lang.String |
format(double value)
Formats a Double into the String used as its internal byte-representation. |
java.lang.String |
format(float value)
Formats a Float into the String used as its internal byte-representation. |
java.lang.String |
formatField(DataField aDataField)
Takes the value of the data field and formats it according its class, Double or Float. |
int |
getByteOrdering()
Returns the value of byteOrdering. |
int |
getSize()
Returns the value of size. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a FloatFormat object using the supplied Tag. |
double |
parseToDouble(java.lang.String aString)
Obtains a double from the String used as the double's internal byte-representation. |
float |
parseToFloat(java.lang.String aString)
Obtains a float from the String used as the float's internal byte-representation. |
void |
setByteOrdering(int anInt)
Sets the value of byteOrdering. |
void |
setSize(int aSize)
Sets the value of size. |
java.lang.String |
toString()
Returns a visual representation of the format element. |
DataField |
unformatField(java.lang.String aString,
DataField aDataField)
Changes the String to a Double or Float depending on its size. |
Methods inherited from class com.ibm.dse.base.FieldFormat |
---|
format, format, toStrings, unformat, unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
---|
exceptionInfo, externalizer, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, 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 |
Constructor Detail |
public FloatFormat()
public FloatFormat(java.lang.String aName) throws java.io.IOException
aName
- java.lang.StringMethod Detail |
public java.lang.String[] extract(java.lang.String aString) throws DSEInvalidArgumentException
extract
in class FormatElement
aString
- String
DSEInvalidArgumentException
public java.lang.String format(double value) throws DSEInvalidArgumentException
value
- double
DSEInvalidArgumentException
public java.lang.String format(float value) throws DSEInvalidArgumentException
value
- float
DSEInvalidArgumentException
public java.lang.String formatField(DataField aDataField) throws DSEInvalidArgumentException, DSEInvalidClassException
formatField
in class FieldFormat
aDataField
- DataField
DSEInvalidArgumentException
DSEInvalidClassException
public int getByteOrdering()
public int getSize()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in interface Externalizable
initializeFrom
in class FormatElement
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public double parseToDouble(java.lang.String aString)
aString
- java.lang.String
public float parseToFloat(java.lang.String aString)
aString
- java.lang.String
public void setByteOrdering(int anInt)
public void setSize(int aSize)
setSize
in class FormatElement
aSize
- intpublic java.lang.String toString()
toString
in class FormatElement
public DataField unformatField(java.lang.String aString, DataField aDataField)
unformatField
in class FieldFormat
aString
- java.lang.String
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |