class CollectionUtilities {

    @SafeVarargs
    public static <T> Collection<T> concat(CollectionProvider<T> provider, Iterable<? extends T>... cols)
    {
        int size = 0;
        for (Iterable<? extends T> col : cols)
        {
            size += col instanceof Collection ? ((Collection<?>)col).size() : 10;
        }

        Collection<T> result = provider.get(size);
        for (Iterable<? extends T> col : cols)
        {
            for (T value : col)
            {
                result.add(value);
            }
        }
        return result;
    }

    private  CollectionUtilities();

}