at.dms.util
Class ArrayLocator
java.lang.Object
at.dms.util.ArrayLocator
public class ArrayLocator
- extends Object
This class allows to find the position of an object in an array.
Method Summary |
int |
getIndex(Object object)
Returns the index of the specified object in the array, or -1
if the object cannot be found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayLocator
public ArrayLocator(Object[] array)
- Constructs a new ArrayLocator object.
getIndex
public int getIndex(Object object)
- Returns the index of the specified object in the array, or -1
if the object cannot be found.
!!! TEST: linear search