P
- the type of the property contentpublic 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.
Type | Property and Description |
---|---|
MetaProperty<P> |
meta
Gets the meta-property representing the parts of the property that are
common across all instances, such as the name.
|
Modifier and Type | Method and Description |
---|---|
<B extends Bean> |
bean()
Gets the bean which owns this property.
|
boolean |
equals(Object obj)
Checks if this property equals another.
|
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.
|
String |
name()
Gets the property name.
|
P |
put(Object value)
Sets the value of the property on the associated bean and returns the previous value.
|
void |
set(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()
String name()
The JavaBean style methods getFoo() and setFoo() will lead to a property name of 'foo' and so on.
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.
UnsupportedOperationException
- if the property is write-onlyvoid set(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 beanClassCastException
- if the value is of an invalid type for the propertyUnsupportedOperationException
- if the property is read-onlyRuntimeException
- if the value is rejected by the property (use appropriate subclasses)P put(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 beanClassCastException
- if the value is of an invalid type for the propertyUnsupportedOperationException
- if the property is read-onlyRuntimeException
- if the value is rejected by the property (use appropriate subclasses)boolean equals(Object obj)
This compares the meta-property and value. It does not consider the property or bean types.
Copyright © 2007–2013 Joda.org. All rights reserved.