org.gcube.indexmanagement.bdbwrapper
Class IntegerComparator

java.lang.Object
  extended by org.gcube.indexmanagement.bdbwrapper.IntegerComparator
All Implemented Interfaces:
Serializable, Comparator<byte[]>

public final class IntegerComparator
extends Object
implements Comparator<byte[]>, Serializable

This class compares two Integers. It 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.

See Also:
Serialized Form

Constructor Summary
IntegerComparator()
           
 
Method Summary
 int compare(byte[] obj1, byte[] obj2)
          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

IntegerComparator

public IntegerComparator()
Method Detail

compare

public int compare(byte[] obj1,
                   byte[] obj2)
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 Comparator<byte[]>
Parameters:
obj1 - - The first Integer to compare
obj2 - - The second Integer to compare
Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.


Copyright © 2012. All Rights Reserved.