title: LinkedListMultimap or MultiMap sequence
body: <p>I have the following multiMap:</p>
  
  <pre><code>1st: [3=&gt;[4,5]]
  2nd: [2=&gt;[3]]
  3rd: [0=&gt;[2]]
  4th: [5=&gt;[1]]
  5th: [4=&gt;[1]]
  </code></pre>
  
  <p>I would like to get the sequence out of it such as:</p>
  
  <pre><code>0-&gt;2-&gt;3-&gt;[4,5]-&gt;1
  </code></pre>
  
  <p>Is it possible?</p>
  
  <p>This is what I have tried, but doesn't seem to work correctly:</p>
  
  <pre><code>// the starting point is given from the start.
  
  Collection&lt;String&gt; col = new HashSet&lt;String&gt;();
  col.add("0");
  buildPath2(myMultimap, col, result2);
  
  static void buildPath2(Multimap&lt;String, String&gt; path, Collection&lt;String&gt; token, List&lt;Collection&lt;String&gt;&gt; result2) {
      if (token != null) {
          result2.add(token);
          Collection&lt;String&gt; c = null;
          for (String elem: token){
             c = path.get(elem);
          }
          buildPath2(path, c, result2);
      }
  }
  </code></pre>