Ejemplo n.º 1
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Element element = (Element) o;

    return weight == element.weight
        && !(attributes != null
            ? !attributes.equals(element.attributes)
            : element.attributes != null)
        && !(body != null ? !body.equals(element.body) : element.body != null)
        && !(children != null ? !children.equals(element.children) : element.children != null)
        && !(id != null ? !id.equals(element.id) : element.id != null)
        && !(type != null ? !type.equals(element.type) : element.type != null);
  }