Implementato NodeSequence e aggiunto alcuni costruttori alle eccezioni

This commit is contained in:
2014-03-30 16:56:16 +02:00
parent 148933ac58
commit c25afb02a2
8 changed files with 294 additions and 2 deletions

View File

@@ -0,0 +1,66 @@
package com.xgiovio;
import arraylist.ArrayIndexList;
import general_utility.test_object;
import sequence.NodeSequence;
/**
* Created with xgiovio.macbookair.
* User: xgiovio
* Date: 23/03/14
* Time: 20:37
*/
public class NodeSequenceTest {
public static void main(String[] args) {
NodeSequence<test_object> a = new NodeSequence<test_object>();
System.out.print(a);
a.add(0,new test_object(1));
System.out.print(a);
a.add(1,new test_object(2));
System.out.print(a);
a.add(2,new test_object(3));
System.out.print(a);
a.add(3,new test_object(4));
System.out.print(a);
a.remove(2);
System.out.print(a);
a.add(0,new test_object(4));
System.out.print(a);
a.add(3,new test_object(10));
System.out.print(a);
a.add(4,new test_object(11));
System.out.print(a);
a.add(6,new test_object(100));
System.out.print(a);
a.set(0,new test_object(100));
System.out.print(a);
a.set(6,new test_object(200));
System.out.print(a);
}
}