Exemplo n.º 1
0
 @Override
 public int hashCode() {
   int result = children != null ? children.hashCode() : 0;
   result = 31 * result + (parent != null ? parent.hashCode() : 0);
   result = 31 * result + classId;
   result = 31 * result + (splitFunction != null ? splitFunction.hashCode() : 0);
   return result;
 }
Exemplo n.º 2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Tree tree = (Tree) o;

    if (classId != tree.classId) return false;
    if (children != null ? !children.equals(tree.children) : tree.children != null) return false;
    if (parent != null ? !parent.equals(tree.parent) : tree.parent != null) return false;
    if (splitFunction != null
        ? !splitFunction.equals(tree.splitFunction)
        : tree.splitFunction != null) return false;

    return true;
  }