Пример #1
0
  /**
   * Overrides Object.hashCode()
   *
   * @return hash code
   */
  public int hashCode() {
    int hash = 0;

    /*
     * We assume that id and severity
     * are non-null.
     * If they are null, then the class invariant is violated and
     * the NullPointerException will be rightfully thrown.
     */
    hash ^= m_id.hashCode();
    hash ^= m_severity.hashCode();

    if (m_parameters != null) {
      hash ^= m_parameters.hashCode();
    }
    if (m_correlations != null) {
      hash ^= m_correlations.hashCode();
    }

    return hash;
  }