P - the type of the property contentBasicPropertypublic interface Property<P>
For a JavaBean, this will ultimately wrap a get/set method pair. Alternate implementations may perform any logic to obtain the value.
| Modifier and Type | Method | Description |
|---|---|---|
<B extends Bean> |
bean() |
Gets the bean which owns this property.
|
boolean |
equals(java.lang.Object obj) |
Checks if this property equals another.
|
default P |
get() |
Gets the value of the property for the associated bean.
|
int |
hashCode() |
Returns a suitable hash code.
|
MetaProperty<P> |
metaProperty() |
Gets the meta-property representing the parts of the property that are
common across all instances, such as the name.
|
default java.lang.String |
name() |
Gets the property name.
|
default P |
put(java.lang.Object value) |
Sets the value of the property on the associated bean and returns the previous value.
|
default void |
set(java.lang.Object value) |
Sets the value of the property on the associated bean.
|
<B extends Bean> B bean()
Each property is fully owned by a single bean.
B - the bean typeMetaProperty<P> metaProperty()
default java.lang.String name()
The JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.
default P get()
For a JavaBean, this is the equivalent to calling getFoo() on the bean itself.
Alternate implementations may perform any logic to obtain the value.
java.lang.UnsupportedOperationException - if the property is write-onlydefault void set(java.lang.Object value)
The value must be of the correct type for the property.
See the meta-property for string conversion.
For a standard JavaBean, this is equivalent to calling setFoo() on the bean.
Alternate implementations may perform any logic to change the value.
value - the value to set into the property on the beanjava.lang.ClassCastException - if the value is of an invalid type for the propertyjava.lang.UnsupportedOperationException - if the property is read-onlyjava.lang.RuntimeException - if the value is rejected by the property (use appropriate subclasses)default P put(java.lang.Object value)
This is a combination of the get and set methods that matches the definition
of put in a Map.
value - the value to set into the property on the beanjava.lang.ClassCastException - if the value is of an invalid type for the propertyjava.lang.UnsupportedOperationException - if the property is read-onlyjava.lang.RuntimeException - if the value is rejected by the property (use appropriate subclasses)boolean equals(java.lang.Object obj)
This compares the meta-property and value. It does not consider the property or bean types.
equals in class java.lang.Objectobj - the other property, null returns falseint hashCode()
hashCode in class java.lang.ObjectCopyright © 2007–2018 Joda.org. All rights reserved.