Implementato Iterator in NodePositionList e aggiunto solo i prototipi nelle altre classe che implementano Sequence

This commit is contained in:
2014-04-01 15:12:42 +02:00
parent c8254693f9
commit 56672f3b94
5 changed files with 102 additions and 3 deletions

View File

@@ -4,6 +4,8 @@ import arraylist.ArrayIndexList;
import general_utility.test_object;
import position.NodePositionList;
import java.util.Iterator;
/**
* Created with xgiovio.macbookair.
* User: xgiovio
@@ -25,6 +27,18 @@ public class NodePositionListTest {
a.reverse();
System.out.print(a);
Iterator<test_object> it = a.iterator();
System.out.print(it.hasNext());
System.out.print(it.next());
System.out.print(it.hasNext());
System.out.print(it.next());
System.out.print(it.hasNext());
System.out.print(it.next());
System.out.print(it.hasNext());
System.out.print(it.next());
System.out.print(it.hasNext());