org.beanfabrics.model
Class DecimalPM
java.lang.Object
org.beanfabrics.AbstractBean
org.beanfabrics.ValidatableBean
org.beanfabrics.model.AbstractPM
org.beanfabrics.model.AbstractValuePM
org.beanfabrics.model.TextPM
org.beanfabrics.model.BigDecimalPM
org.beanfabrics.model.DecimalPM
- All Implemented Interfaces:
- Bean, ContextOwner, HasComparable, IBigDecimalPM, ITextPM, IValuePM, PresentationModel, Supportable, Validatable
public class DecimalPM
- extends BigDecimalPM
The DecimalPM
is a PresentationModel
that contains a decimal
number. It offers setter and getter methods for Double and Float.
Method Summary |
java.lang.Byte |
getByte()
|
java.lang.Double |
getDouble()
Returns the value of this PM as a Double . |
java.lang.Float |
getFloat()
Returns the value of this PM as a Float . |
java.lang.Integer |
getInteger()
|
java.lang.Long |
getLong()
|
java.lang.Short |
getShort()
|
void |
setByte(java.lang.Byte value)
|
void |
setDouble(java.lang.Double value)
Sets the value of this PM to the given Double value. |
void |
setFloat(java.lang.Float value)
Sets the value of this PM to the given Float . |
void |
setInteger(java.lang.Integer value)
|
void |
setLong(java.lang.Long value)
|
void |
setShort(java.lang.Short value)
|
Methods inherited from class org.beanfabrics.model.BigDecimalPM |
createDefaultFormat, getBigDecimal, getBigInteger, getComparable, getDecimalFormat, getFormat, reformat, setBigDecimal, setBigInteger, setDefaultBigDecimal, setDefaultBigInteger, setFormat |
Methods inherited from class org.beanfabrics.model.TextPM |
getDefaultText, getOptions, getText, getText, isEmpty, isModified, isRestrictedToOptions, preset, reset, setDefaultText, setOptions, setRestrictedToOptions, setText |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecimalPM
public DecimalPM()
- Constructs a
DecimalPM
.
getDouble
public java.lang.Double getDouble()
throws ConversionException
- Returns the value of this PM as a
Double
.
- Returns:
- the value of this PM as a Double
- Throws:
ConversionException
- if the text value of this PM can't be
converted to a double value using the defined format- See Also:
#setFormat(java.text.DecimalFormat)
,
TextPM.getText()
setDouble
public void setDouble(java.lang.Double value)
- Sets the value of this PM to the given
Double
value.
- Parameters:
value
- the double value- See Also:
TextPM.setText(String)
getFloat
public java.lang.Float getFloat()
throws ConversionException
- Returns the value of this PM as a
Float
.
- Returns:
- the value of this PM as a Float
- Throws:
ConversionException
- if the text value of this PM can't be
converted to a float value using the defined format
setFloat
public void setFloat(java.lang.Float value)
- Sets the value of this PM to the given
Float
.
- Parameters:
value
- the float value
setByte
public void setByte(java.lang.Byte value)
getByte
public java.lang.Byte getByte()
throws ConversionException
- Throws:
ConversionException
setShort
public void setShort(java.lang.Short value)
getShort
public java.lang.Short getShort()
throws ConversionException
- Throws:
ConversionException
setInteger
public void setInteger(java.lang.Integer value)
getInteger
public java.lang.Integer getInteger()
throws ConversionException
- Throws:
ConversionException
setLong
public void setLong(java.lang.Long value)
getLong
public java.lang.Long getLong()
throws ConversionException
- Throws:
ConversionException