Class NormalizingComparator
java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
org.apache.directory.api.ldap.model.schema.LdapComparator<String>
org.apache.directory.api.ldap.model.schema.comparators.NormalizingComparator
- All Implemented Interfaces:
Serializable, Comparator<String>, SchemaObject
A comparator which normalizes a value first before using a subordinate
comparator to compare them.
- Author:
- Apache Directory Project
- See Also:
-
Field Summary
Fields inherited from class LdapComparator
normalizerFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
ConstructorsConstructorDescriptionThe NormalizingComparator constructor.NormalizingComparator(String oid, Normalizer normalizer, LdapComparator<String> comparator) A comparator which normalizes a value first before comparing them. -
Method Summary
Modifier and TypeMethodDescriptionintvoidA special method used when renaming an SchemaObject: we may have to change it's OIDvoidtells that the normalizingComparator should not normalize values which are already normalized on the serverMethods inherited from class LdapComparator
equals, getNormalizer, hashCode, setSchemaManager, toStringMethods inherited from class LoadableSchemaObject
copy, getBytecode, getFqcn, isValid, setBytecode, setFqcnMethods inherited from class AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, rehash, rehashBase, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setSchemaName, setSpecification, unlockMethods inherited from interface Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NormalizingComparator
The NormalizingComparator constructor. Its OID is the matching rule OID.- Parameters:
oid- The Comparator's OID
-
NormalizingComparator
A comparator which normalizes a value first before comparing them.- Parameters:
oid- The Comparator's OIDnormalizer- the Normalizer to normalize values with before comparingcomparator- the underlying comparator to use for comparisons
-
-
Method Details
-
compare
-
setOid
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:
setOidin interfaceSchemaObject- Overrides:
setOidin classAbstractSchemaObject- Parameters:
oid- The new OID
-
setOnServer
public void setOnServer()tells that the normalizingComparator should not normalize values which are already normalized on the server
-