public class InstantProperty extends AbstractRegularProperty<Instant> implements WritableInstantProperty
WritableInstantProperty
.AbstractProperty.PropertyBuilder<T extends AbstractProperty<? extends V>>
Modifier and Type | Field and Description |
---|---|
private Instant |
value |
TYPE
PROPERTY_TYPE
NO_PROPERTIES
Constructor and Description |
---|
InstantProperty(String name,
Bean bean)
The constructor.
|
InstantProperty(String name,
Bean bean,
AbstractValidator<? super Instant> validator)
The constructor.
|
InstantProperty(String name,
Bean bean,
Supplier<Instant> expression)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Instant |
doGetValue() |
protected boolean |
doSetValue(Instant newValue)
Called from
AbstractValueProperty.setValue(Object) . |
void |
fromJson(javax.json.stream.JsonParser json)
Deserializes this object from JSON (JavaScript-Object-Notation).
|
protected void |
toJson(javax.json.stream.JsonGenerator json,
Instant instantValue) |
ValidatorBuilderInstant<AbstractProperty.PropertyBuilder<InstantProperty>> |
withValdidator() |
addListener, addListener, fireValueChangedEvent, removeListener, removeListener
bind, bindBidirectional, clearValidationResult, copy, equals, getReadOnly, getValue, hashCode, invalidated, isBound, isReadOnly, isValid, markInvalid, requireWritable, setValue, 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
getType, isAfter, isBefore
get, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull
getBean, getName
addListener, getValue, removeListener
getValue
toJson
getReadOnly, getReadOnly, isMandatory, isReadOnly, isValid, validate
bind, bindBidirectional, isBound, unbind, unbindBidirectional
setValue
private Instant value
public InstantProperty(String name, Bean bean)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.public InstantProperty(String name, Bean bean, AbstractValidator<? super Instant> validator)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.validator
- - see AbstractValueProperty.validate()
.public InstantProperty(String name, Bean bean, Supplier<Instant> expression)
name
- - see AbstractProperty.getName()
.bean
- - see AbstractProperty.getBean()
.expression
- the Supplier
providing
the actual value
.protected Instant doGetValue()
doGetValue
in class AbstractValueProperty<Instant>
value
.protected boolean doSetValue(Instant newValue)
AbstractValueProperty
AbstractValueProperty.setValue(Object)
.doSetValue
in class AbstractValueProperty<Instant>
newValue
- the new value
to set.true
if the value
has changed, false
otherwise.public ValidatorBuilderInstant<AbstractProperty.PropertyBuilder<InstantProperty>> withValdidator()
withValdidator
in class AbstractProperty<Instant>
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, Instant instantValue)
toJson
in class AbstractProperty<Instant>
json
- the JsonGenerator
.instantValue
- 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.fromJson
in interface JsonSupport
json
- the JsonParser
to read from.Copyright © 2001–2016 mmm-Team. All rights reserved.