class TinySet extends AbstractProxySet<E> {

    public static <T> Set<T> addAll(Set<T> input, Collection<? extends T> c)
    {
        if (c.isEmpty())
        {
            return input;
        }
        else if (input.isEmpty())
        {
            if (c.size() == 1)
            {
                return Collections.<T>singleton(c.iterator().next());
            }
            Set<T> result = New.set(c);
            if (result.size() == 1)
            {
                result = Collections.<T>singleton(c.iterator().next());
            }
            return result;
        }
        else if (input.size() == 1)
        {
            Set<T> result = New.set(c.size() + 1);
            result.addAll(input);
            if (result.addAll(c))
            {
                return result;
            }
            return input;
        }
        else
        {
            input.addAll(c);
            return input;
        }
    }

}