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:
parent
68b7a5c281
commit
3174b2cbfa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue