P - the type of the property contentpublic final class BasicProperty<P> extends 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.
| 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.
|
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.
|
String |
toString()
Returns a string that summarises the property.
|
public MetaProperty<P> metaProperty
metaProperty in interface Property<P>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(Object obj)
PropertyThis compares the meta-property and value. It does not consider the property or bean types.
public int hashCode()
PropertyCopyright © 2007–2017 Joda.org. All rights reserved.