com.ibm.dse.appl.ej.base
Class BigDecimalFormat

java.lang.Object
  |
  +--com.ibm.dse.base.FormatElement
        |
        +--com.ibm.dse.base.FieldFormat
              |
              +--com.ibm.dse.appl.ej.base.BigDecimalFormat

public class BigDecimalFormat
extends FieldFormat

The BigDecmialFormat class formats a BigDecmial object into a string

See Also:
, Serialized Form

Fields inherited from class com.ibm.dse.base.FormatElement
dataElementName, name
 
Constructor Summary
BigDecimalFormat()
          This constructor creates a BigDecmialFormat object
BigDecimalFormat(java.lang.String aName)
          This constructor creates a BigDecmialFormat object
 
Method Summary
 java.lang.String format(java.math.BigDecimal aValue)
          Returns the string representation of the BigDecimal
 java.lang.String formatField(DataField aDataField)
          Accesses the value of the DataField and checks that it is a valid BigDecmial.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes an BigDecmialFormat with the aTag attributes.
 java.lang.String toString()
          Converts the BigDecimalFormat to a String.
 DataField unformatField(java.lang.String aString, DataField aDataField)
          Updates the DataField value by interpreting the input string.
 
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

BigDecimalFormat

public BigDecimalFormat()
This constructor creates a BigDecmialFormat object

BigDecimalFormat

public BigDecimalFormat(java.lang.String aName)
                 throws java.io.IOException
This constructor creates a BigDecmialFormat object
Parameters:
aName - String, a formater name
Method Detail

format

public java.lang.String format(java.math.BigDecimal aValue)
Returns the string representation of the BigDecimal
Parameters:
aValue - BigDecimal, a BigDecimal
Returns:
String, a String respresentation of the BigDecimal

formatField

public java.lang.String formatField(DataField aDataField)
                             throws DSEInvalidArgumentException,
                                    DSEInvalidClassException
Accesses the value of the DataField and checks that it is a valid BigDecmial.
Overrides:
formatField in class FieldFormat
Parameters:
aDataField - DataField, a DataField
Returns:
String, a string respresentation of the BigDecmial

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Initializes an BigDecmialFormat with the aTag attributes.
Overrides:
initializeFrom in class FormatElement
Parameters:
aTag, - configuration parameter
Returns:
Object, a FormatExternalizer
Throws:
IOException, - throws when problem occurs in accessing SGML files
See Also:
Tag

toString

public java.lang.String toString()
Converts the BigDecimalFormat to a String.
Overrides:
toString in class FormatElement
Returns:
String, a String respresentation of this object

unformatField

public DataField unformatField(java.lang.String aString,
                               DataField aDataField)
                        throws DSEInvalidArgumentException
Updates the DataField value by interpreting the input string.
Overrides:
unformatField in class FieldFormat
Parameters:
aString - String, a String respresentation of a BigDecimal
aDataField - DataField, a given DataField
Returns:
DataField, a DataField contains a new BigDecimal