Class AttributeComparator


  • public class AttributeComparator
    extends Object
    Compares the values of two directory attributes and produces the necessary LDAP modification instructions if they don't match. The attribute names may differ, but their base syntax (text / binary) must be identical.
    • Constructor Detail

      • AttributeComparator

        public AttributeComparator()
        Creates a new attribute comparator.
    • Method Detail

      • compare

        public List<ModifySpec> compare​(com.unboundid.ldap.sdk.Attribute srcAttr,
                                        com.unboundid.ldap.sdk.Attribute targetAttr)
        Compares two directory entry attributes. If they don't match returns a list of LDAP modification specs to apply to the target attribute so that it becomes identical to the source attribute.
        Parameters:
        srcAttr - The source attribute. Must not be null.
        targetAttr - The target attribute. Must not be null.
        Returns:
        A list of the LDAP modification specs, empty if the attributes match.