From dcd7463d2577101b1801938a2a1262cce87f71f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Wed, 21 Oct 2015 07:39:34 +0000 Subject: [PATCH] - systematic check for equals/hashCode (no problem) - suppressed useless @overrides --- src/fr/inrialpes/exmo/align/impl/BasicRelation.java | 4 ++-- .../exmo/align/impl/BitSetDisjunctiveRelation.java | 6 +++--- src/org/semanticweb/owl/align/Cell.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fr/inrialpes/exmo/align/impl/BasicRelation.java b/src/fr/inrialpes/exmo/align/impl/BasicRelation.java index 20e7b579..ec677cfb 100644 --- a/src/fr/inrialpes/exmo/align/impl/BasicRelation.java +++ b/src/fr/inrialpes/exmo/align/impl/BasicRelation.java @@ -203,7 +203,7 @@ public class BasicRelation implements Relation { } /** Are the two relations equal **/ - @Override public boolean equals( Object o ) { + public boolean equals( Object o ) { if ( o == this ) return true; if ( o == null ) return false; if ( o instanceof Relation ) return equals( (Relation)o ); @@ -217,7 +217,7 @@ public class BasicRelation implements Relation { return ( relation.equals( r.getRelation() ) ); } - @Override public int hashCode() { + public int hashCode() { return 19+relation.hashCode(); } diff --git a/src/fr/inrialpes/exmo/align/impl/BitSetDisjunctiveRelation.java b/src/fr/inrialpes/exmo/align/impl/BitSetDisjunctiveRelation.java index 0384c25b..25383f20 100644 --- a/src/fr/inrialpes/exmo/align/impl/BitSetDisjunctiveRelation.java +++ b/src/fr/inrialpes/exmo/align/impl/BitSetDisjunctiveRelation.java @@ -148,7 +148,7 @@ public abstract class BitSetDisjunctiveRelation<T extends BaseRelation> extends } /** Are the two relations equal **/ - @Override public boolean equals ( Object o ) { + public boolean equals ( Object o ) { if ( o == this ) return true; if ( o == null ) return false; if ( o instanceof Relation ) return equals( ((Relation)o) ); @@ -156,7 +156,7 @@ public abstract class BitSetDisjunctiveRelation<T extends BaseRelation> extends } // V5: This should be suppressed (code moved in the object method) - @Override public boolean equals ( Relation r ) { + public boolean equals ( Relation r ) { if ( r == this ) return true; if ( r == null ) return false; if ( r instanceof BitSetDisjunctiveRelation ) { @@ -164,7 +164,7 @@ public abstract class BitSetDisjunctiveRelation<T extends BaseRelation> extends } else return false; } - @Override public int hashCode() { + public int hashCode() { return 3221+relset.hashCode(); } diff --git a/src/org/semanticweb/owl/align/Cell.java b/src/org/semanticweb/owl/align/Cell.java index a95b15b6..8b27e418 100644 --- a/src/org/semanticweb/owl/align/Cell.java +++ b/src/org/semanticweb/owl/align/Cell.java @@ -69,7 +69,7 @@ public interface Cell extends Comparable<Cell>, Visitable { public void setRelation( Relation r ); public double getStrength(); public void setStrength( double m ); - // V5: This is a bad choice to have introduced this here + // V5: This is a bad choice to have introduced this here: must be deprecated public boolean equals( Cell c ); /** -- GitLab