mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
03.53.2014 333c7b4a76e819dec8d2b46a381e323266a16059
opendj3-server-dev/src/server/org/opends/server/api/SubstringMatchingRule.java
@@ -345,72 +345,6 @@
          }
      }
      // TODO : reminder : should add this method in the SDK
      /** {@inheritDoc} */
      @Override
    public int hashCode()
    {
      int hashCode = 0;
      if (normInitial != null)
      {
        hashCode += normInitial.hashCode();
      }
      if (normAnys != null)
      {
        for (ByteString any : normAnys)
        {
          hashCode += any.hashCode();
        }
      }
      if (normFinal != null)
      {
        hashCode += normFinal.hashCode();
      }
      return hashCode;
    }
      // TODO : reminder : should add this method in the SDK
      /** {@inheritDoc} */
      @Override
      public boolean equals(Object obj)
      {
        if (obj == this)
        {
          return true;
        }
        if (! (obj instanceof DefaultSubstringAssertion))
        {
          return false;
        }
        DefaultSubstringAssertion other = (DefaultSubstringAssertion) obj;
        boolean initialCheck = normInitial == null ? other.normInitial == null : normInitial.equals(other.normInitial);
        if (!initialCheck)
        {
          return false;
        }
        boolean finalCheck = normFinal == null ? other.normFinal == null : normFinal.equals(other.normFinal);
        if (!finalCheck)
        {
          return false;
        }
        boolean anyCheck = normAnys == null ? other.normAnys == null : normAnys.length == other.normAnys.length;
        if (!anyCheck)
        {
          return false;
        }
        if (normAnys != null)
        {
          for (int i = 0; i < normAnys.length; i++)
          {
            if (! normAnys[i].equals(other.normAnys[i]))
            {
              return false;
            }
          }
        }
        return true;
      }
  }
  /** {@inheritDoc} */