示例#1
0
文件: Node.java 项目: weigo/dot4j
  /** {@inheritDoc} */
  @Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }

    if (obj == null) {
      return false;
    }

    if (getClass() != obj.getClass()) {
      return false;
    }

    return id.equals(((Node) obj).getId());
  }
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    DynamicServiceAnnouncement that = (DynamicServiceAnnouncement) o;

    if (id != null ? !id.equals(that.id) : that.id != null) {
      return false;
    }
    if (properties != null ? !properties.equals(that.properties) : that.properties != null) {
      return false;
    }
    if (type != null ? !type.equals(that.type) : that.type != null) {
      return false;
    }

    return true;
  }