iterable custom linkedlist
<p>i am writing a LinkedList class as part of an assignment.
LinkedList.java: </p>

<p>LinkedList class: <a href="http://pastebin.com/KyKM3hP2" rel="nofollow">http://pastebin.com/KyKM3hP2</a></p>

<p>i am trying to get foreach working with my class.</p>

<pre><code>LinkedList&lt;LinkedList&gt; ListA = new LinkedList&lt;&gt;();
LinkedList&lt;String&gt; ListB = new LinkedList&lt;&gt;();

ListB.append("Test1");
ListB.append("Test2");
ListB.append("Test3");

ListA.append(ListB);

//this works fine
for (String i : ListB){
    //do something with i
}
//this does not
for (String i : ListA.index(0)){
    //do something with i
}

//both the above loops should interate over ListB
//but only the first one does
</code></pre>