Class SerializableComparator<E>
- 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<E>
-
- org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<E>
-
- Type Parameters:
E- The type of object to compare
- All Implemented Interfaces:
Serializable,Comparator<E>,SchemaObject
- Direct Known Subclasses:
UuidComparator
public class SerializableComparator<E> extends LdapComparator<E> implements Serializable
A serializable wrapper around a Comparator which uses delayed initialization of the underlying wrapped comparator which is JIT resolved from a static global registry.- Author:
- Apache Directory Project
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private StringmatchingRuleOidthe OID of the matchingRule for this comparatorprivate SchemaManagerschemaManagerA reference to the schema managerprivate static longserialVersionUIDThe serial version UIDprivate Comparator<E>wrappedthe transient wrapped comparator-
Fields inherited from class org.apache.directory.api.ldap.model.schema.LdapComparator
normalizer
-
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification
-
-
Constructor Summary
Constructors Constructor Description SerializableComparator(String matchingRuleOid)Creates a new instance of SerializableComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(E o1, E o2)voidsetSchemaManager(SchemaManager schemaManager)Store the SchemaManager in this instance.-
Methods inherited from class org.apache.directory.api.ldap.model.schema.LdapComparator
equals, getNormalizer, hashCode, toString
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
copy, getBytecode, getFqcn, isValid, setBytecode, setFqcn
-
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, computeHashCode, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serial version UID- See Also:
- Constant Field Values
-
matchingRuleOid
private String matchingRuleOid
the OID of the matchingRule for this comparator
-
wrapped
private transient Comparator<E> wrapped
the transient wrapped comparator
-
schemaManager
private transient SchemaManager schemaManager
A reference to the schema manager
-
-
Constructor Detail
-
SerializableComparator
public SerializableComparator(String matchingRuleOid)
Creates a new instance of SerializableComparator.- Parameters:
matchingRuleOid- The MatchingRule OID
-
-
Method Detail
-
compare
public int compare(E o1, E o2)
- Specified by:
comparein interfaceComparator<E>
-
setSchemaManager
public void setSchemaManager(SchemaManager schemaManager)
Description copied from class:LdapComparatorStore the SchemaManager in this instance. It may be necessary for some comparator which needs to have access to the oidNormalizer Map.- Overrides:
setSchemaManagerin classLdapComparator<E>- Parameters:
schemaManager- the schemaManager to set
-
-