Class NormalizingComparator

All Implemented Interfaces:
Serializable, Comparator<String>, SchemaObject

public class NormalizingComparator extends LdapComparator<String>
A comparator which normalizes a value first before using a subordinate comparator to compare them.
Author:
Apache Directory Project
See Also:
  • Constructor Details

    • NormalizingComparator

      public NormalizingComparator(String oid)
      The NormalizingComparator constructor. Its OID is the matching rule OID.
      Parameters:
      oid - The Comparator's OID
    • NormalizingComparator

      public NormalizingComparator(String oid, Normalizer normalizer, LdapComparator<String> comparator)
      A comparator which normalizes a value first before comparing them.
      Parameters:
      oid - The Comparator's OID
      normalizer - the Normalizer to normalize values with before comparing
      comparator - the underlying comparator to use for comparisons
  • Method Details

    • compare

      public int compare(String o1, String o2)
    • setOid

      public void setOid(String oid)
      A special method used when renaming an SchemaObject: we may have to change it's OID This implementation makes sure we update the oid property of the contained normalizer and comparator.
      Specified by:
      setOid in interface SchemaObject
      Overrides:
      setOid in class AbstractSchemaObject
      Parameters:
      oid - The new OID
    • setOnServer

      public void setOnServer()
      tells that the normalizingComparator should not normalize values which are already normalized on the server