Package org.joda.beans.impl
Class BasicProperty<P>
- java.lang.Object
-
- org.joda.beans.impl.BasicProperty<P>
-
- Type Parameters:
P- the type of the property content
- All Implemented Interfaces:
Property<P>
public final class BasicProperty<P> extends Object implements Property<P>
A property that binds aBeanto aMetaProperty.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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <B extends Bean>
Bbean()Gets the bean which owns this property.booleanequals(Object obj)Checks if this property equals another.inthashCode()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.StringtoString()Returns a string that summarises the property.
-
-
-
Method Detail
-
of
public static <P> BasicProperty<P> of(Bean bean, MetaProperty<P> metaProperty)
Factory to create a property avoiding duplicate generics.- Type Parameters:
P- the property type- Parameters:
bean- the bean that the property is bound to, not nullmetaProperty- the meta property, not null- Returns:
- the property, not null
-
bean
public <B extends Bean> B bean()
Description copied from interface:PropertyGets the bean which owns this property.Each property is fully owned by a single bean.
-
metaProperty
public MetaProperty<P> metaProperty()
Description copied from interface:PropertyGets the meta-property representing the parts of the property that are common across all instances, such as the name.- Specified by:
metaPropertyin interfaceProperty<P>- Returns:
- the meta-property, not null
-
equals
public boolean equals(Object obj)
Description copied from interface:PropertyChecks if this property equals another.This compares the meta-property and value. It does not consider the property or bean types.
-
hashCode
public int hashCode()
Description copied from interface:PropertyReturns a suitable hash code.
-
-