Package com.rometools.rome.feed.impl
Class EqualsBean
- java.lang.Object
-
- com.rometools.rome.feed.impl.EqualsBean
-
public class EqualsBean extends Object
Provides deep Bean equals() and hashCode() functionality for Java Beans.It works on all read/write properties, recursively. It support all primitive types, Strings, Collections, bean-like objects and multi-dimensional arrays of any of them.
The hashcode is calculated by getting the hashcode of the Bean String representation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanbeanEquals(Class<?> beanClass, Object obj1, Object obj2)Indicates whether some other object is "equal to" the object passed in the constructor, as defined by the Object equals() method.static intbeanHashCode(Object obj)Returns the hashcode for the object passed in the constructor.
-
-
-
Method Detail
-
beanEquals
public static boolean beanEquals(Class<?> beanClass, Object obj1, Object obj2)
Indicates whether some other object is "equal to" the object passed in the constructor, as defined by the Object equals() method.To be used by classes using EqualsBean in a delegation pattern,
- Parameters:
obj1- The reference object with which to compare.obj2- The object to which to compare.- Returns:
- true if the object passed in the constructor is equal to the 'obj' object.
-
beanHashCode
public static int beanHashCode(Object obj)
Returns the hashcode for the object passed in the constructor.It follows the contract defined by the Object hashCode() method.
The hashcode is calculated by getting the hashcode of the Bean String representation.
To be used by classes using EqualsBean in a delegation pattern,
- Returns:
- the hashcode of the bean object.
-
-