title: Arrays, lists, sets and maps are iterable. What else?
body: <p>Even if only <code>List</code> and <code>Set</code> implement the interface <code>Iterable</code>, I believe that an array, a list, a set and a map are all <em>iterable</em> objects, in that we can use them all through a foreach loop:</p>
  
  <pre><code>for(String s : new String[0]);
  for(String s : new ArrayList&lt;String&gt;());
  for(String s : new HashSet&lt;String&gt;());
  for(Entry&lt;Integer, String&gt; entry : new HashMap&lt;Integer, String&gt;().entrySet());
  </code></pre>
  
  <p><em>The case of <code>Map</code> is maybe a bit different, but let consider it as a key-value list (what it actually is).</em></p>
  
  <p>Starting with that <em>iterable understanding</em>, am I missing a type in the following method?</p>
  
  <pre><code>public boolean isIterable(Object o) {
      return o instanceof Object[] || o instanceof Iterable || o instanceof Map;
  }
  </code></pre>
  
  <p>In other words, are there any other types that can be iterated through a foreach loop?</p>
  
  <p>Side but resulting question: is that list of types exhaustive?</p>