NXYSignificanceHeuristic equality update (#28616)

* NXYSignificanceHeuristic.java: implementation of equality would have
  failed with a ClassCastException when comparing to another type.
  Replaced with the Eclipse generated form.
This commit is contained in:
Robin Neatherway 2018-02-12 23:51:57 +00:00 committed by Ryan Ernst
parent 68b7a5c281
commit 3174b2cbfa
1 changed files with 13 additions and 2 deletions

View File

@ -68,8 +68,19 @@ public abstract class NXYSignificanceHeuristic extends SignificanceHeuristic {
}
@Override
public boolean equals(Object other) {
return ((NXYSignificanceHeuristic) other).includeNegatives == includeNegatives && ((NXYSignificanceHeuristic) other).backgroundIsSuperset == backgroundIsSuperset;
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
NXYSignificanceHeuristic other = (NXYSignificanceHeuristic) obj;
if (backgroundIsSuperset != other.backgroundIsSuperset)
return false;
if (includeNegatives != other.includeNegatives)
return false;
return true;
}
@Override