org.wegra.util.collection.array
Class Index

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

public final class Index
extends java.lang.Object

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

Constructor Summary
Index()
           
 
Method Summary
static int getFirst(byte target, byte[] list)
          Returns index of specified target in given list.
static int getFirst(char target, char[] list)
          Returns index of specified target in given list.
static int getFirst(double target, double[] list)
          Returns index of specified target in given list.
static int getFirst(float target, float[] list)
          Returns index of specified target in given list.
static int getFirst(int target, int[] list)
          Returns index of specified target in given list.
static int getFirst(long target, long[] list)
          Returns index of specified target in given list.
static int getFirst(java.lang.Object target, java.lang.Object[] list, java.util.Comparator comp)
          Returns index of specified target in given list.
static int getFirst(short target, short[] list)
          Returns index of specified target in given list.
static int getLast(byte target, byte[] list)
          Returns index of specified target in given list.
static int getLast(char target, char[] list)
          Returns index of specified target in given list.
static int getLast(double target, double[] list)
          Returns index of specified target in given list.
static int getLast(float target, float[] list)
          Returns index of specified target in given list.
static int getLast(int target, int[] list)
          Returns index of specified target in given list.
static int getLast(long target, long[] list)
          Returns index of specified target in given list.
static int getLast(java.lang.Object target, java.lang.Object[] list, java.util.Comparator comp)
          Returns index of specified target in given list.
static int getLast(short target, short[] list)
          Returns index of specified target in given list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Index

public Index()
Method Detail

getFirst

public static int getFirst(java.lang.Object target,
                           java.lang.Object[] list,
                           java.util.Comparator comp)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(long target,
                           long[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(int target,
                           int[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(short target,
                           short[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(char target,
                           char[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(byte target,
                           byte[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(double target,
                           double[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getFirst

public static int getFirst(float target,
                           float[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(java.lang.Object target,
                          java.lang.Object[] list,
                          java.util.Comparator comp)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(long target,
                          long[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(int target,
                          int[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(short target,
                          short[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(char target,
                          char[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(byte target,
                          byte[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(double target,
                          double[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.

getLast

public static int getLast(float target,
                          float[] list)
Returns index of specified target in given list.

Returns:
Index of target, or -1 if given list doesn't contain it.