diff options
Diffstat (limited to 'libjava/classpath/java/beans/PropertyDescriptor.java')
-rw-r--r-- | libjava/classpath/java/beans/PropertyDescriptor.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libjava/classpath/java/beans/PropertyDescriptor.java b/libjava/classpath/java/beans/PropertyDescriptor.java index 416d468576f..a22d6252e28 100644 --- a/libjava/classpath/java/beans/PropertyDescriptor.java +++ b/libjava/classpath/java/beans/PropertyDescriptor.java @@ -61,7 +61,6 @@ import java.lang.reflect.Method; ** @since 1.1 ** @status updated to 1.4 **/ - public class PropertyDescriptor extends FeatureDescriptor { Class propertyType; @@ -521,6 +520,22 @@ public class PropertyDescriptor extends FeatureDescriptor return newPropertyType; } + /** + * Return a hash code for this object, conforming to the contract described + * in {@link Object#hashCode()}. + * @return the hash code + * @since 1.5 + */ + public int hashCode() + { + return ((propertyType == null ? 0 : propertyType.hashCode()) + | (propertyEditorClass == null ? 0 : propertyEditorClass.hashCode()) + | (bound ? Boolean.TRUE : Boolean.FALSE).hashCode() + | (constrained ? Boolean.TRUE : Boolean.FALSE).hashCode() + | (getMethod == null ? 0 : getMethod.hashCode()) + | (setMethod == null ? 0 : setMethod.hashCode())); + } + /** Compares this <code>PropertyDescriptor</code> against the * given object. * Two PropertyDescriptors are equals if |