org.opends.server.backends.jeb
Class IndexModComparator

java.lang.Object
  extended by org.opends.server.backends.jeb.IndexModComparator
All Implemented Interfaces:
java.util.Comparator<IndexMod>

public class IndexModComparator
extends java.lang.Object
implements java.util.Comparator<IndexMod>

A comparator for index modifications.


Constructor Summary
IndexModComparator(java.util.Comparator<byte[]> comparator, boolean compareID)
          Create a new comparator for index modifications.
 
Method Summary
 int compare(IndexMod a, IndexMod b)
          Compares its two arguments for order.
 
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

IndexModComparator

public IndexModComparator(java.util.Comparator<byte[]> comparator,
                          boolean compareID)
Create a new comparator for index modifications.

Parameters:
comparator - The index key comparator.
compareID - Indicates when true that the entry ID should also factor into the comparison, in addition to the index key.
Method Detail

compare

public int compare(IndexMod a,
                   IndexMod b)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface java.util.Comparator<IndexMod>
Parameters:
a - the first object to be compared.
b - the second object to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.