net.sf.cb2java.copybook.data
Class DecimalData
java.lang.Object
net.sf.cb2java.copybook.data.Data
net.sf.cb2java.copybook.data.ValueData
net.sf.cb2java.copybook.data.NumericData
net.sf.cb2java.copybook.data.DecimalData
- public class DecimalData
- extends NumericData
Field Summary |
java.math.BigDecimal |
data
|
Method Summary |
java.math.BigDecimal |
getBigDecimal()
|
double |
getDouble()
|
float |
getFloat()
|
java.lang.Object |
getValue()
returns the Object as it's 'natural' Java type |
void |
setRoundingMode(int mode)
|
void |
setValue(java.math.BigDecimal data)
|
void |
setValue(java.math.BigDecimal data,
boolean validate)
|
void |
setValue(double data)
sets the value of this data object with the given floating
point number. |
protected void |
setValueImpl(java.lang.Object data)
called by setData after validate is called |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
public java.math.BigDecimal data
DecimalData
public DecimalData(Numeric definition)
setRoundingMode
public void setRoundingMode(int mode)
getFloat
public float getFloat()
getDouble
public double getDouble()
getBigDecimal
public java.math.BigDecimal getBigDecimal()
setValue
public void setValue(double data)
- sets the value of this data object with the given floating
point number. Rounds the value to the decimalPlaces specified
in the definiton using this object's rounding more.
- Parameters:
data
- the value to set this Object to
setValueImpl
protected void setValueImpl(java.lang.Object data)
- Description copied from class:
Data
- called by setData after validate is called
- Specified by:
setValueImpl
in class Data
- Parameters:
data
- the data to set
setValue
public void setValue(java.math.BigDecimal data)
setValue
public void setValue(java.math.BigDecimal data,
boolean validate)
getValue
public java.lang.Object getValue()
- Description copied from class:
Data
- returns the Object as it's 'natural' Java type
- Specified by:
getValue
in class Data