net.rim.device.api.collection
Class LongKeyProviderAdaptorComparator

java.lang.Object
  extended by net.rim.device.api.collection.LongKeyProviderAdaptorComparator
All Implemented Interfaces:
Comparator

public class LongKeyProviderAdaptorComparator
extends Object
implements Comparator

Comparator that uses long keys provided by a LongKeyProviderAdaptor to order items.

Since:
BlackBerry API 4.0.0

Constructor Summary
LongKeyProviderAdaptorComparator(LongKeyProviderAdaptor longKeyProviderAdaptor)
          Constructor.
 
Method Summary
 int compare(Object o1, Object o2)
          Compares two arguments for order.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.rim.device.api.util.Comparator
equals
 



Constructor Detail

LongKeyProviderAdaptorComparator

public LongKeyProviderAdaptorComparator(LongKeyProviderAdaptor longKeyProviderAdaptor)
Constructor.

Parameters:
longKeyProviderAdaptor - The adaptor to use to retrieve the long keys.
Since:
BlackBerry API 4.0.0


Method Detail

compare

public int compare(Object o1,
                   Object o2)
Description copied from interface: Comparator
Compares two arguments for order.

Specified by:
compare in interface Comparator
Parameters:
o1 - First object to compare.
o2 - Second object to compare.
Returns:
A Negative integer if the first object is 'less than' the second; a positive integer if the first object is 'greater than' the second; zero if the two objects are 'equal'.
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)
Since:
BlackBerry API 4.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal