Class BasicBean

  • All Implemented Interfaces:
    Bean

    public abstract class BasicBean
    extends Object
    implements Bean
    Basic implementation of Bean intended 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 Detail

      • BasicBean

        public BasicBean()
    • Method Detail

      • clone

        public BasicBean clone()
        Clones this bean, returning an independent copy.
        Overrides:
        clone in class Object
        Returns:
        the clone, not null
      • equals

        public boolean equals​(Object obj)
        Checks if this bean equals another.

        This compares the class and all the properties of the bean.

        Overrides:
        equals in class 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:
        hashCode in class Object
        Returns:
        a suitable hash code
      • toString

        public String toString()
        Returns a string that summarises the bean.

        The string contains the class name and properties.

        Overrides:
        toString in class Object
        Returns:
        a summary string, not null