Implementato NodeSequence e aggiunto alcuni costruttori alle eccezioni
This commit is contained in:
66
com/xgiovio/NodeSequenceTest.java
Normal file
66
com/xgiovio/NodeSequenceTest.java
Normal 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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user