74 lines
1.9 KiB
Java
74 lines
1.9 KiB
Java
package com.xgiovio;
|
|
|
|
import arraylist.ArrayIndexList;
|
|
import general_utility.test_object;
|
|
import position.NodePositionList;
|
|
import position.Position;
|
|
|
|
import java.util.Iterator;
|
|
|
|
/**
|
|
* Created with xgiovio.macbookair.
|
|
* User: xgiovio
|
|
* Date: 23/03/14
|
|
* Time: 20:37
|
|
*/
|
|
public class NodePositionListTest {
|
|
|
|
public static void main(String[] args) {
|
|
NodePositionList<Integer> a = new NodePositionList<Integer>();
|
|
|
|
a.addLast(new Integer(1));
|
|
a.addLast(new Integer(1));
|
|
a.addLast(new Integer(1));
|
|
a.addLast(new Integer(2));
|
|
a.addLast(new Integer(2));
|
|
a.addLast(new Integer(2));
|
|
a.addLast(new Integer(3));
|
|
a.addLast(new Integer(4));
|
|
a.addLast(new Integer(4));
|
|
a.addLast(new Integer(4));
|
|
a.addLast(new Integer(4));
|
|
a.addLast(new Integer(4));
|
|
|
|
|
|
|
|
|
|
System.out.print(a);
|
|
|
|
Iterator<Integer> 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());
|
|
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());
|
|
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());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|