|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.joda.beans.StandardProperty<B,P>
B - the type of the beanP - the type of the property contentpublic final class StandardProperty<B,P>
A property that binds a Bean to a MetaProperty.
This is the standard implementation of a property. It defers the strategy of getting and setting the value to the meta-property.
This implementation is also a map entry to aid performance in
| Method Summary | ||
|---|---|---|
B |
bean()
Gets the bean which owns this property. |
|
boolean |
equals(Object obj)
|
|
P |
get()
Gets the value of the property for the associated bean. |
|
String |
getKey()
|
|
Property<B,P> |
getValue()
|
|
int |
hashCode()
|
|
MetaProperty<B,P> |
metaProperty()
Gets the meta-property representing the parts of the property that are common across all instances, such as the name. |
|
static
|
of(B bean,
MetaProperty<B,P> metaProperty)
Factory to create a property avoiding duplicate generics. |
|
void |
set(P value)
Sets the value of the property on the associated bean. |
|
Property<B,P> |
setValue(Property<B,P> value)
|
|
String |
toString()
Returns a string that summarizes the property. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <B,P> StandardProperty<B,P> of(B bean,
MetaProperty<B,P> metaProperty)
bean - the bean that the property is bound to, not nullmetaProperty - the meta property, not nullpublic B bean()
PropertyEach property is fully owned by a single bean.
bean in interface Property<B,P>public MetaProperty<B,P> metaProperty()
Property
metaProperty in interface Property<B,P>public P get()
Property
For a JavaBean, this is the equivalent to calling getFoo() on the bean itself.
Alternate implementations may perform any logic to obtain the value.
get in interface Property<B,P>public void set(P value)
Property
For a standard JavaBean, this is equivalent to calling setFoo() on the bean.
Alternate implementations may perform any logic to change the value.
set in interface Property<B,P>value - the value to set into the property on the beanpublic String getKey()
getKey in interface Map.Entry<String,Property<B,P>>public Property<B,P> getValue()
getValue in interface Map.Entry<String,Property<B,P>>public Property<B,P> setValue(Property<B,P> value)
setValue in interface Map.Entry<String,Property<B,P>>public boolean equals(Object obj)
equals in interface Map.Entry<String,Property<B,P>>equals in class Objectpublic int hashCode()
hashCode in interface Map.Entry<String,Property<B,P>>hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||