@Override public boolean equals(Object other) { if (other == this) { return true; } else if (!(other instanceof AbstractOutlierSet)) { return false; } AbstractOutlierSet rhs = (AbstractOutlierSet) other; return _conformers.equals(rhs.getConformers()) && _outliers.equals(rhs.getOutliers()) && Objects.equals(this.getRole(), rhs.getRole()); }
public double outlierScore() { return zScore(); } }
public int compareTo(AbstractOutlierSet other) { int oScore = Double.compare(other.outlierScore(), this.outlierScore()); if (oScore != 0) { return oScore; } Optional<String> thisRole = this.getRole(); Optional<String> otherRole = other.getRole(); if (thisRole.isPresent()) { if (otherRole.isPresent()) { return thisRole.get().compareTo(otherRole.get()); } else { return 1; } } else if (otherRole.isPresent()) { return -1; } else { return 0; } }
@Override // sort in reverse order of zScore, which is a measure of how likely it is that // our hypothesis is correct public int compareTo(OutlierSet<T> other) { int superScore = super.compareTo(other); if (superScore != 0) { return superScore; } return _name.compareTo(other.getName()); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof OutlierSet)) { return false; } OutlierSet<?> rhs = (OutlierSet<?>) o; return super.equals(rhs) && _name.equals(rhs.getName()); }
@Override public int compareTo(NamedStructureOutlierSet<T> other) { int superScore = super.compareTo(other); if (superScore != 0) { return superScore; } int structComp = _structType.compareTo(other.getStructType()); if (structComp != 0) { return structComp; } return _name.compareTo(other.getName()); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof NamedStructureOutlierSet)) { return false; } NamedStructureOutlierSet<?> rhs = (NamedStructureOutlierSet<?>) o; return super.equals(rhs) && _structType.equals(rhs.getStructType()) && _name.equals(rhs.getName()); }