コード例 #1
0
  @Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof CiaType)) {
      return false;
    }

    final CiaType other = (CiaType) obj;
    if (approximated(this) == approximated(other)) {
      final String this_content = this.getContent();
      final String other_content = other.getContent();
      if (this_content == other_content
          || (this_content != null && this_content.equals(other_content))) {
        return true;
      }
    }

    return false;
  }