public class BigDecimalProperty extends NumberProperty<BigDecimal>
WritableDoubleProperty
.AbstractProperty.PropertyBuilder<T extends AbstractProperty<? extends V>>
Modifier and Type | Field and Description |
---|---|
static GenericType<BigDecimal> |
TYPE |
private BigDecimal |
value |
NO_PROPERTIES
PROPERTY_TYPE
Constructor and Description |
---|
BigDecimalProperty(String name,
Bean bean)
The constructor.
|
BigDecimalProperty(String name,
Bean bean,
AbstractValidator<? super Number> validator)
The constructor.
|
BigDecimalProperty(String name,
Bean bean,
Supplier<BigDecimal> expression)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected BigDecimal |
doGetValue() |
protected void |
doSetNumber(BigDecimal newValue) |
void |
fromJson(javax.json.stream.JsonParser json)
Deserializes this object from JSON (JavaScript-Object-Notation).
|
GenericType<? extends Number> |
getType() |
void |
setValue(Number value)
This method sets the
value . |
protected void |
toJson(javax.json.stream.JsonGenerator json,
Number number) |
ValidatorBuilderBigDecimal<AbstractProperty.PropertyBuilder<BigDecimalProperty>> |
withValdidator() |
doSetValue
addListener, addListener, fireValueChangedEvent, removeListener, removeListener
bind, bindBidirectional, clearValidationResult, copy, equals, getReadOnly, getValue, hashCode, invalidated, isBound, isReadOnly, isValid, markInvalid, requireWritable, unbind, unbindBidirectional, validate
assignValueFrom, clone, copy, copy, copy, copy, copy, getBean, getJsonUtil, getName, getValidator, isMandatory, toJson, toString, withValdidator
finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, add, add, add, asString, asString, asString, divide, divide, divide, divide, divide, doubleValue, floatValue, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, intValue, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, longValue, multiply, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtract, subtract
getReadOnly, getReadOnly, isMandatory, isReadOnly, isValid, validate
bind, bindBidirectional, isBound, unbind, unbindBidirectional
getBean, getName
addListener, getValue, removeListener
toJson
public static final GenericType<BigDecimal> TYPE
getType()
private BigDecimal value
public BigDecimalProperty(String name, Bean bean)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.public BigDecimalProperty(String name, Bean bean, AbstractValidator<? super Number> validator)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.validator
- - see AbstractValueProperty.validate()
.public BigDecimalProperty(String name, Bean bean, Supplier<BigDecimal> expression)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.expression
- the Supplier
providing
the actual value
.public void setValue(Number value)
AttributeWriteValue
value
.setValue
in interface javafx.beans.value.WritableValue<Number>
setValue
in interface AttributeWriteValue<Number>
setValue
in class AbstractValueProperty<Number>
value
- is the new value
. May be null
unless otherwise stated.protected BigDecimal doGetValue()
doGetValue
in class AbstractValueProperty<Number>
value
.protected void doSetNumber(BigDecimal newValue)
doSetNumber
in class NumberProperty<BigDecimal>
newValue
- the new value
to set.public GenericType<? extends Number> getType()
value
. Please note that the generic signature of this method
is returning the type GenericType
<? extends V> instead of GenericType
<V> because JavaFx is binding the type Number
for all numeric properties while e.g.
IntegerProperty
should be able to return GenericType
<Integer> what is compatible
with GenericType
<? extends Number>.public ValidatorBuilderBigDecimal<AbstractProperty.PropertyBuilder<BigDecimalProperty>> withValdidator()
withValdidator
in class AbstractProperty<Number>
builder
for the validator of this property with a
parent-builder
to create a AbstractProperty.copy(AbstractValidator)
of this
property with the configured validator.protected void toJson(javax.json.stream.JsonGenerator json, Number number)
toJson
in class AbstractProperty<Number>
json
- the JsonGenerator
.number
- the value
.AbstractProperty.toJson(JsonGenerator)
public void fromJson(javax.json.stream.JsonParser json)
JsonSupport
JsonSupport.toJson(JsonGenerator)
- e.g. JsonSupport.toJson(JsonGenerator)
might write a property with its value while
JsonSupport.fromJson(JsonParser)
may only deserialze the value as the parent object has to handle the property names
that may appear in any order.json
- the JsonParser
to read from.Copyright © 2001–2016 mmm-Team. All rights reserved.