org.apache.directory.server.schema
Class SerializableComparator<E>

java.lang.Object
  extended by org.apache.directory.server.schema.SerializableComparator<E>
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<E>
Direct Known Subclasses:
LongComparator

public class SerializableComparator<E>
extends java.lang.Object
implements java.util.Comparator<E>, java.io.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.

Version:
$Rev: 610243 $
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
SerializableComparator(java.lang.String matchingRuleOid)
           
 
Method Summary
 int compare(E o1, E o2)
           
static void setRegistry(ComparatorRegistry registry)
          Sets the global Comparator registry for comparator lookups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SerializableComparator

public SerializableComparator(java.lang.String matchingRuleOid)
Method Detail

setRegistry

public static void setRegistry(ComparatorRegistry registry)
Sets the global Comparator registry for comparator lookups.

Parameters:
registry - the comparator registry to use for Comparator lookups

compare

public int compare(E o1,
                   E o2)
Specified by:
compare in interface java.util.Comparator<E>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.