class CollectionUtilities {

    public static <T extends Comparable<T>> void addSorted(List<T> list, Collection<? extends T> added)
    {
        if (list.isEmpty())
        {
            list.addAll(added);
        }
        else
        {
            for (T bin : added)
            {
                int index = indexOf(bin, list);
                list.add(index, bin);
            }
        }
    }

    private  CollectionUtilities();

}