Revision: 20015
          http://sourceforge.net/p/gate/code/20015
Author:   markagreenwood
Date:     2017-01-30 11:33:40 +0000 (Mon, 30 Jan 2017)
Log Message:
-----------
much easier to see if we are reading the right things back from disk if we have 
sensible equality tests

Modified Paths:
--------------
    
gate/branches/sawdust2/gate-core/src/main/java/gate/creole/ResourceReference.java

Modified: 
gate/branches/sawdust2/gate-core/src/main/java/gate/creole/ResourceReference.java
===================================================================
--- 
gate/branches/sawdust2/gate-core/src/main/java/gate/creole/ResourceReference.java
   2017-01-30 11:28:58 UTC (rev 20014)
+++ 
gate/branches/sawdust2/gate-core/src/main/java/gate/creole/ResourceReference.java
   2017-01-30 11:33:40 UTC (rev 20015)
@@ -39,6 +39,26 @@
     this.uri = uri;
   }
 
+  @Override
+  public int hashCode() {
+    final int prime = 31;
+    int result = 1;
+    result = prime * result + ((uri == null) ? 0 : uri.hashCode());
+    return result;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if(this == obj) return true;
+    if(obj == null) return false;
+    if(getClass() != obj.getClass()) return false;
+    ResourceReference other = (ResourceReference)obj;
+    if(uri == null) {
+      if(other.uri != null) return false;
+    } else if(!uri.equals(other.uri)) return false;
+    return true;
+  }
+
   public ResourceReference(Plugin plugin, String path)
       throws URISyntaxException {
     if(plugin != null) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to