core/src/main/java/com/orientechnologies/common/util/OCollections.java
public static int indexOf(final Object[] array, final Comparable object) {
    for (int i = 0; i < array.length; ++i) {
      if (object.compareTo(array[i]) == 0)
        // FOUND
        return i;
    }
    return -1;
  }
public static int indexOf(final Object[] array, final Comparable object) {
    for (int i = 0; i < array.length; ++i) {
      if (object.compareTo(array[i]) == 0)
        // FOUND
        return i;
    }
    return -1;
  }
This method is used to find an item in an array.

@param array  Array in which value should be found.
@param object Object to find.

@return Index of found item or <code>-1</code> otherwise.