class CollectionUtilities {

    public static <T extends Comparable<T>> int indexOf(T searchItem, List<? extends T> list)
    {
        int index = Collections.binarySearch(list, searchItem);
        if (index < 0)
        {
            index = -1 * (index + 1);
        }
        return index;
    }

    private  CollectionUtilities();

}