Implementato Iterator in NodePositionList e aggiunto solo i prototipi nelle altre classe che implementano Sequence
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user