public static int indexOf ( @ NonNull final boolean [ ] array , final boolean value ) { Condition . INSTANCE . ensureNotNull ( array , "The array may not be null" ) ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( array [ i ] == value ) { return i ; } } return - 1 ; }
Returns the index of the first item of an array which equals a specific boolean value .