class CollectionUtilities {

    public static <T> Iterator<T> iterate(final Iterator<? extends T> iter1, final Iterator<? extends T> iter2)
    {
        return new Iterator<>()
        {
            @Override
            public boolean hasNext()
            {
                return iter1.hasNext() || iter2.hasNext();
            }

            @Override
            public T next()
            {
                if (iter1.hasNext())
                {
                    return iter1.next();
                }
                return iter2.next();
            }

            @Override
            public void remove()
            {
                throw new UnsupportedOperationException();
            }
        };
    }

    private  CollectionUtilities();

}