P - the type of the property contentProperty<P>public final class BasicProperty<P> extends java.lang.Object implements Property<P>
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 maps.
| 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.
|
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.
|
static <P> BasicProperty<P> |
of(Bean bean,
MetaProperty<P> metaProperty) |
Factory to create a property avoiding duplicate generics.
|
java.lang.String |
toString() |
Returns a string that summarises the property.
|
public static <P> BasicProperty<P> of(Bean bean, MetaProperty<P> metaProperty)
P - the property typebean - the bean that the property is bound to, not nullmetaProperty - the meta property, not nullpublic <B extends Bean> B bean()
PropertyEach property is fully owned by a single bean.
public MetaProperty<P> metaProperty()
PropertymetaProperty in interface Property<P>public boolean equals(java.lang.Object obj)
PropertyThis compares the meta-property and value. It does not consider the property or bean types.
public int hashCode()
Propertypublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2007–2018 Joda.org. All rights reserved.