com.sun.syndication.feed.impl
クラス EqualsBean

java.lang.Object
  上位を拡張 com.sun.syndication.feed.impl.EqualsBean
すべての実装されたインタフェース:
java.io.Serializable

public class EqualsBean
extends java.lang.Object
implements java.io.Serializable

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.

関連項目:
直列化された形式

コンストラクタの概要
protected EqualsBean(java.lang.Class beanClass)
          Default constructor.
  EqualsBean(java.lang.Class beanClass, java.lang.Object obj)
          Creates a EqualsBean to be used in a delegation pattern.
 
メソッドの概要
 boolean beanEquals(java.lang.Object obj)
          Indicates whether some other object is "equal to" the object passed in the constructor, as defined by the Object equals() method.
 int beanHashCode()
          Returns the hashcode for the object passed in the constructor.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this object as defined by the Object equals() method.
 int hashCode()
          Returns the hashcode for this object.
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

EqualsBean

protected EqualsBean(java.lang.Class beanClass)
Default constructor.

To be used by classes extending EqualsBean only.

パラメータ:
beanClass - the class/interface to be used for property scanning.

EqualsBean

public EqualsBean(java.lang.Class beanClass,
                  java.lang.Object obj)
Creates a EqualsBean to be used in a delegation pattern.

For example:

public class Foo implements FooI { private EqualsBean _equalsBean; public Foo() { _equalsBean = new EqualsBean(FooI.class); } public boolean equals(Object obj) { return _equalsBean.beanEquals(obj); } public int hashCode() { return _equalsBean.beanHashCode(); } }

パラメータ:
beanClass - the class/interface to be used for property scanning.
obj - object bean to test equality.
メソッドの詳細

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this object as defined by the Object equals() method.

To be used by classes extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes should use the

オーバーライド:
クラス java.lang.Object 内の equals
パラメータ:
obj - he reference object with which to compare.
戻り値:
true if 'this' object is equal to the 'other' object.
関連項目:
beanEquals method.


beanEquals

public boolean beanEquals(java.lang.Object obj)
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,

パラメータ:
obj - he reference object with which to compare.
戻り値:
true if the object passed in the constructor is equal to the 'obj' object.
関連項目:
constructor.


hashCode

public int hashCode()
Returns the hashcode for this object.

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 extending EqualsBean. Although it works also for classes using EqualsBean in a delegation pattern, for correctness those classes should use the

オーバーライド:
クラス java.lang.Object 内の hashCode
戻り値:
the hashcode of the bean object.
関連項目:
beanHashCode method.


beanHashCode

public int beanHashCode()
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,

戻り値:
the hashcode of the bean object.
関連項目:
constructor.