title: One liner for getting a sublist from a Set
body: <p>Is there a one-liner (maybe from Guava or Apache Collections) that gets a sublist from a set. Internally it should do something like this:</p>
  
  <pre><code>public &lt;T&gt; List&lt;T&gt; sublist(Set&lt;T&gt; set, int count) {
    Iterator&lt;T&gt; iterator = set.iterator();
    List&lt;T&gt; sublist = new LinkedList&lt;T&gt;();
    int pos = 0;
    while (iterator.hasNext() &amp;&amp; pos++ &lt; count) {
      sublist.add(iterator.next());
    }
    return sublist;
  }
  </code></pre>
  
  <p>Obviously, if there are not enough elements it has to return as many as possible.</p>