edu.rit.util
Class Searching.Long

java.lang.Object
  extended by edu.rit.util.Searching.Long
Enclosing class:
Searching

public static class Searching.Long
extends Object

Class Searching.Long is the base class for a helper object used to search an array of type long[].


Constructor Summary
Searching.Long()
           
 
Method Summary
 int compare(long a, long b)
          Compare two elements according to the desired ordering criterion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Searching.Long

public Searching.Long()
Method Detail

compare

public int compare(long a,
                   long b)
Compare two elements according to the desired ordering criterion.

The default implementation compares a and b using ascending order. A subclass can override this method to obtain a different ordering criterion; for example, descending order.

Parameters:
a - First element being compared.
b - Second element being compared.
Returns:
A number less than, equal to, or greater than 0 if a comes before, is the same as, or comes after b, respectively.


Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.