ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1643947 - /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
Date Mon, 08 Dec 2014 22:39:57 GMT
Author: seanfinan
Date: Mon Dec  8 22:39:57 2014
New Revision: 1643947

URL: http://svn.apache.org/r1643947
Log:
Simplified hashCode and equals to use CUI only

Modified:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java?rev=1643947&r1=1643946&r2=1643947&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/concept/Concept.java
Mon Dec  8 22:39:57 2014
@@ -50,7 +50,7 @@ final public class Concept {
          ctakesSemantics.add( CONST.NE_TYPE_ID_UNKNOWN );
       }
       _ctakesSemantics = Collections.unmodifiableCollection( ctakesSemantics );
-      _hashcode = (cui + "_" + preferredText + "_" + codes.hashCode()).hashCode();
+      _hashcode = cui.hashCode();
    }
 
    public String getCui() {
@@ -85,10 +85,7 @@ final public class Concept {
     */
    @Override
    public boolean equals( final Object value ) {
-      return value instanceof Concept
-             && _cui.equals( ((Concept)value)._cui )
-             && _preferredText.equals( ((Concept)value)._preferredText )
-             && _codes.equals( ((Concept)value)._codes );
+      return value instanceof Concept && _cui.equals( ((Concept)value)._cui );
    }
 
    /**



Mime
View raw message