public static <T> int indexOf(@NonNull T[] array, @Nullable T object) {
        for (int i = 0; i < array.length; i++) {
            if (array[i] == object)
                return i;
        }
        return -1;
    }
Get index of object in array.
@param array some array
@param object some object
@return index of object in array or -1
library/src/main/java/com/cleveroad/audiovisualization/Utils.java