org.apache.directory.shared.ldap.util
Class LongComparator

java.lang.Object
  extended by org.apache.directory.shared.ldap.util.LongComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<java.lang.Object>

public class LongComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.Object>, java.io.Serializable

Compares Long keys and values within a table.

Version:
$Revision: 437007 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
static LongComparator INSTANCE
          A instance of this comparator
 
Constructor Summary
LongComparator()
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compare two objects.
 
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
 

Field Detail

INSTANCE

public static final LongComparator INSTANCE
A instance of this comparator

Constructor Detail

LongComparator

public LongComparator()
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compare two objects.

Specified by:
compare in interface java.util.Comparator<java.lang.Object>
Parameters:
obj1 - First object
obj2 - Second object
Returns:
1 if obj1 > obj2, 0 if obj1 == obj2, -1 if obj1 < obj2


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