|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wegra.util.collection.array.SequentialSearch
Sequential search.
Constructor Summary | |
SequentialSearch()
|
Method Summary | |
static int |
search(byte target,
byte[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(char target,
char[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(double target,
double[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(float target,
float[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(int target,
int[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(long target,
long[] array)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(java.lang.Object target,
java.lang.Object[] array,
java.util.Comparator comp)
Finds a target element in a given array ,
and returns the index.
|
static int |
search(short target,
short[] array)
Finds a target element in a given array ,
and returns the index.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SequentialSearch()
Method Detail |
public static int search(java.lang.Object target, java.lang.Object[] array, java.util.Comparator comp)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(long target, long[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(int target, int[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(short target, short[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(char target, char[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(byte target, byte[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(double target, double[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.public static int search(float target, float[] array)
target
element in a given array
,
and returns the index.
It will return -1
if a given array
does not
contains a target
.
target
, if a given array
doesn't contains it, it will return -1
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |