org.wegra.util.collection.array
Class SortedIndex

java.lang.Object
  extended byorg.wegra.util.collection.array.SortedIndex

public final class SortedIndex
extends java.lang.Object

Version:
1.0.0 (2003-06-08)
Author:
wegra (Bok-Youn Lee)

Constructor Summary
SortedIndex()
           
 
Method Summary
static int getLast(byte[] sorttedArray, byte key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(byte[] sorttedArray, int from, int to, byte key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(char[] sorttedArray, char key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(char[] sorttedArray, int from, int to, char key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(double[] sorttedArray, double key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(double[] sorttedArray, int from, int to, double key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(float[] sorttedArray, float key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(float[] sorttedArray, int from, int to, float key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(int[] sorttedArray, int key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(int[] sorttedArray, int from, int to, int key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(long[] sorttedArray, int from, int to, long key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(long[] sorttedArray, long key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(java.lang.Object[] sorttedArray, int from, int to, java.lang.Object key, java.util.Comparator comp)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(java.lang.Object[] sorttedArray, java.lang.Object key, java.util.Comparator comp)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
static int getLast(short[] sorttedArray, int from, int to, short key)
          Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.
static int getLast(short[] sorttedArray, short key)
          Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedIndex

public SortedIndex()
Method Detail

getLast

public static int getLast(java.lang.Object[] sorttedArray,
                          java.lang.Object key,
                          java.util.Comparator comp)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(java.lang.Object[] sorttedArray,
                          int from,
                          int to,
                          java.lang.Object key,
                          java.util.Comparator comp)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(long[] sorttedArray,
                          long key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(long[] sorttedArray,
                          int from,
                          int to,
                          long key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(int[] sorttedArray,
                          int key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(int[] sorttedArray,
                          int from,
                          int to,
                          int key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(short[] sorttedArray,
                          short key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(short[] sorttedArray,
                          int from,
                          int to,
                          short key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(char[] sorttedArray,
                          char key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(char[] sorttedArray,
                          int from,
                          int to,
                          char key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(byte[] sorttedArray,
                          byte key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(byte[] sorttedArray,
                          int from,
                          int to,
                          byte key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(double[] sorttedArray,
                          double key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(double[] sorttedArray,
                          int from,
                          int to,
                          double key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.


getLast

public static int getLast(float[] sorttedArray,
                          float key)
Returns the last index which has same value in 'sortted' array, using modified binary search algorithm.


getLast

public static int getLast(float[] sorttedArray,
                          int from,
                          int to,
                          float key)
Returns the last index which has same value in 'sortted subarray' of specified array, using modified binary search algorithm.