T - the type of value this property holdspublic interface Property<T> extends HasValue<T>
setValue method.setValue(Object)| Modifier and Type | Method and Description |
|---|---|
default boolean |
accepts(T value)
Returns
true if this property can be set to the given value. |
boolean |
setValue(T value)
Sets the value of this property.
|
boolean setValue(@Nonnull T value)
This can fail and return false if, for example, the value did not satisfy the constraints of the property.
This operation can still succeed with a rejected value,
if eg. a corrected value can be found.
value - the new value this property should receivetrue if this property changed as a result of the callaccepts(Object)default boolean accepts(@Nonnull T value)
true if this property can be set to the given value.value - the value to checktrue if this property accepts the given value, false otherwise.setValue(Object)