org.multijava.util
Class ArrayLocator
java.lang.Object
org.multijava.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 |
MIN_HASH
private static final int MIN_HASH
array
private Object[] array
hashed
private Hashtable hashed
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. !!!
mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.