Liferay 6.1.2-ce-ga3

com.liferay.portal.kernel.util
Class BinarySearch<E>

java.lang.Object
  extended by com.liferay.portal.kernel.util.BinarySearch<E>

public abstract class BinarySearch<E>
extends Object


Constructor Summary
BinarySearch()
           
 
Method Summary
protected abstract  int compare(int index, E element)
           
 int find(E e)
           
 int find(E e, int low)
           
 int find(E e, int low, int high)
           
 int findFirst(E e)
           
 int findFirst(E e, int low)
           
 int findFirst(E e, int low, int high)
           
 int findLast(E e)
           
 int findLast(E e, int low)
           
 int findLast(E e, int low, int high)
           
static
<T extends Comparable<T>>
BinarySearch<T>
forList(List<T> list)
           
static
<T> BinarySearch<T>
forList(List<T> list, Comparator<T> comparator)
           
protected abstract  int getLastIndex()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarySearch

public BinarySearch()
Method Detail

forList

public static <T extends Comparable<T>> BinarySearch<T> forList(List<T> list)

forList

public static <T> BinarySearch<T> forList(List<T> list,
                                          Comparator<T> comparator)

find

public int find(E e)

find

public int find(E e,
                int low)

find

public int find(E e,
                int low,
                int high)

findFirst

public int findFirst(E e)

findFirst

public int findFirst(E e,
                     int low)

findFirst

public int findFirst(E e,
                     int low,
                     int high)

findLast

public int findLast(E e)

findLast

public int findLast(E e,
                    int low)

findLast

public int findLast(E e,
                    int low,
                    int high)

compare

protected abstract int compare(int index,
                               E element)

getLastIndex

protected abstract int getLastIndex()

Liferay 6.1.2-ce-ga3