// ///////////////////////////////////////////
  // overwriting methods that compare objects of this type
  // ---equals
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;
    Sample otherSample = (Sample) obj;
    if (modelNodeToDataNode == null && otherSample.modelNodeToDataNode == null) return true;

    TreeSet<String> dn1 = this.getIDs();
    double mismatch1 = this.getMismatch();
    TreeSet<String> rel1 = this.getRelationships();

    TreeSet<String> dn2 = otherSample.getIDs();
    double mismatch2 = otherSample.getMismatch();
    TreeSet<String> rel2 = otherSample.getRelationships();

    // System.out.println(mismatch1);
    // System.out.println(mismatch1);
    // printSet(dn1);
    // printSet(dn2);
    // printSet(rel1);
    // printSet(rel2);

    if (mismatch1 == mismatch2 && dn1.equals(dn2) && rel1.equals(rel2)) {
      // System.out.println("equal");
      return true;
    }
    // System.out.println("not equal");
    return false;
  }