unico 2004/07/04 11:59:44
Modified: src/share/org/apache/slide/common RequestedPropertyImpl.java
Log:
implement hashCode
Revision Changes Path
1.6 +10 -11
jakarta-slide/src/share/org/apache/slide/common/RequestedPropertyImpl.java
Index: RequestedPropertyImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/RequestedPropertyImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RequestedPropertyImpl.java 11 Feb 2004 11:30:11 -0000 1.5
+++ RequestedPropertyImpl.java 4 Jul 2004 18:59:44 -0000 1.6
@@ -88,8 +88,7 @@
public String getName() {
return propertyName;
}
-
-
+
/**
* checks, if another Object is equal to this RequestedProperty
*
@@ -98,17 +97,13 @@
* @return true if equal
*/
public boolean equals (Object o) {
-
if (! (o instanceof RequestedProperty))
return false;
-
RequestedProperty other = (RequestedProperty)o;
if (!namespace.equals (other.getNamespace()))
return false;
-
if (!propertyName.equals (other.getName()))
return false;
-
return true;
}
@@ -120,5 +115,9 @@
public String toString () {
return namespace + propertyName;
}
-
+
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]