I wonder if there's such a way to iterate thru multiple collections with the extended for each loop in java.
So something like:
for (Object element : collection1, collection2, ....) // do something ...
Thanks
You can do exactly this with Guava's Iterables.concat():
Iterables.concat()
for (Foo element : Iterables.concat(collection1, collection2)) { foo.frob(); }