コード例 #1
0
 public int hashCode() {
   int code = 17;
   code += geneName.hashCode();
   code *= 37;
   code += s288cCoords.hashCode();
   code *= 37;
   return code;
 }
コード例 #2
0
  public boolean equals(Object o) {
    if (!(o instanceof GeneOrthologyEntry)) {
      return false;
    }
    GeneOrthologyEntry e = (GeneOrthologyEntry) o;
    if (!geneName.equals(e.geneName)) {
      return false;
    }
    if (!s288cCoords.equals(e.s288cCoords)) {
      return false;
    }

    if (sigmaCoords != null && e.sigmaCoords != null) {
      if (!sigmaCoords.equals(e.sigmaCoords)) {
        return false;
      }
    } else {
      if (sigmaCoords != null || e.sigmaCoords != null) {
        return false;
      }
    }

    return true;
  }