- java.lang.Object
-
- org.joda.beans.impl.BasicBean
-
- All Implemented Interfaces:
Bean
public abstract class BasicBean extends java.lang.Object implements Bean
Basic implementation ofBeanintended for applications to subclass.The subclass must to provide an implementation for
Bean.metaBean(). This returns the complete definition of the bean at the meta level.
-
-
Constructor Summary
Constructors Constructor Description BasicBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicBeanclone()Clones this bean, returning an independent copy.booleanequals(java.lang.Object obj)Checks if this bean equals another.inthashCode()Returns a suitable hash code.java.lang.StringtoString()Returns a string that summarises the bean.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.joda.beans.Bean
metaBean, property, propertyNames
-
-
-
-
Method Detail
-
clone
public BasicBean clone()
Clones this bean, returning an independent copy.- Overrides:
clonein classjava.lang.Object- Returns:
- the clone, not null
-
equals
public boolean equals(java.lang.Object obj)
Checks if this bean equals another.This compares the class and all the properties of the bean.
- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare to, null returns false- Returns:
- true if the beans are equal
-
hashCode
public int hashCode()
Returns a suitable hash code.The hash code is derived from all the properties of the bean.
- Overrides:
hashCodein classjava.lang.Object- Returns:
- a suitable hash code
-
toString
public java.lang.String toString()
Returns a string that summarises the bean.The string contains the class name and properties.
- Overrides:
toStringin classjava.lang.Object- Returns:
- a summary string, not null
-
-