Class DnComparator

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

public class DnComparator extends LdapComparator<Object>
Compare two DNs
Author:
Apache Directory Project
See Also:
  • Constructor Details

    • DnComparator

      public DnComparator(String oid)
      Creates a new instance of DnComparator.
      Parameters:
      oid - The Comparator's OID
  • Method Details

    • compare

      public int compare(String dn1, String dn2)
      Compare two String DNs
      Parameters:
      dn1 - The first DN
      dn2 - The second DN
      Returns:
      -1 i the first DN is inferior to the second DN, 1 if the second DN is superior, 0 of they are equal
    • compare

      public int compare(Object obj0, Object obj1)
    • setSchemaManager

      public void setSchemaManager(SchemaManager schemaManager)
      Store the SchemaManager in this instance. It may be necessary for some comparator which needs to have access to the oidNormalizer Map.
      Overrides:
      setSchemaManager in class LdapComparator<Object>
      Parameters:
      schemaManager - the schemaManager to store