Concatenating ImmutableLists
<p>I have a <code>List&lt;ImmutableList&lt;T&gt;&gt;</code>. I want to flatten it into a single <code>ImmutableList&lt;T&gt;</code> that is a concatenation of all the internal <code>ImmutableLists</code>. These lists can be very long so I do not want this operation to perform a copy of all the elements. The number of <code>ImmutableLists</code> to flatten will be relatively small, so it is fine that lookup will be linear in the number of <code>ImmutableLists</code>. I would strongly prefer that the concatenation will return an <code>Immutable</code> collection. And I need it to return a <code>List</code> that can be accessed in a random location.</p>

<p>Is there a way to do this in Guava?</p>

<p>There is <code>Iterables.concat</code> but that returns an <code>Iterable</code>. To convert this into an <code>ImmutableList</code> again will be linear in the size of the lists IIUC.</p>