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

@param array  Array of integers in which value should be found.
@param object number to find.

@return Index of found item or <code>-1</code> otherwise.
This method is used to find a number in an array .