|
From: <lh...@us...> - 2010-01-13 16:04:03
|
Revision: 135
http://tmapi.svn.sourceforge.net/tmapi/?rev=135&view=rev
Author: lheuer
Date: 2010-01-13 16:03:49 +0000 (Wed, 13 Jan 2010)
Log Message:
-----------
Changed semantics of equals / hashCode
Modified Paths:
--------------
trunk/src/main/java/org/tmapi/core/Construct.java
Modified: trunk/src/main/java/org/tmapi/core/Construct.java
===================================================================
--- trunk/src/main/java/org/tmapi/core/Construct.java 2010-01-10 17:31:49 UTC (rev 134)
+++ trunk/src/main/java/org/tmapi/core/Construct.java 2010-01-13 16:03:49 UTC (rev 135)
@@ -103,24 +103,22 @@
/**
* Returns <tt>true</tt> if the <tt>other</tt> object is equal to this one.
*
- * Equality must be the result of comparing the ids of the two objects.
- * If <tt>other</tt> is not an instance of {@link Construct}, the return
- * value is <tt>false</tt>.
+ * Equality must be the result of comparing the identity (<tt>this == other</tt>)
+ * of the two objects.
*
* Note: This equality test does not reflect any equality rule according
* to the <a href="http://www.isotopicmaps.org/sam/sam-model/">Topic Maps - Data Model (TMDM)</a>
* by intention.
*
* @param other The object to compare this object against.
- * @return <tt>(other instanceof Construct && this.getId().equals(((Construct)other).getId()))</tt>
+ * @return <tt>(this == other)</tt>
*/
public boolean equals(Object other);
/**
- * Returns a hash code value.
+ * Returns the hash code value.
*
- * The returned hash code is equal to the hash code of the {@link #getId()}
- * property.
+ * The returned hash code is equal to the hash code of <tt>System.identityHashCode(this);</tt>.
*
* @return <tt>this.getId().hashCode()</tt>
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|