Is there a most general "iterable" type accepted by Java for-each loops?
<p>Is there a type <code>XXX&lt;T&gt;</code> that can be iterated on with for-each and subsumes both <code>T[]</code> and <code>Iterable&lt;T&gt;</code> so that the following compiles (assuming class context and a compatible method <code>do_something</code>) ?</p>

<pre><code>public void iterate(XXX&lt;T&gt; items)
{
    for (T t : items)
        do_something(t);
}

public void iterate_array(T[] items)
{
    iterate(items);
}

public void iterate_iterable(Iterable&lt;T&gt; items)
{
    iterate(items);
}
</code></pre>

<p>In Java 1.5 I found nothing of the kind. Perhaps in a later version of the language ?
(I guess it's probably a FAQ. Sorry for the noise if it is. A quick google search did not give the answer.)</p>
