Comepletata la ListPartion aggiungendo alcuni metodi a OrderedListset
This commit is contained in:
48
com/xgiovio/ListPartitionTest.java
Normal file
48
com/xgiovio/ListPartitionTest.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.xgiovio;
|
||||
|
||||
import partition.ListPartition;
|
||||
import position.NodePositionList;
|
||||
import set.OrderedListSet;
|
||||
import set.Set;
|
||||
|
||||
/**
|
||||
* Created with MONSTER.
|
||||
* User: xgiovio
|
||||
* Date: 18/05/2014
|
||||
* Time: 15:58
|
||||
*/
|
||||
public class ListPartitionTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
ListPartition<String > a = new ListPartition<String>() ;
|
||||
|
||||
|
||||
Set<String> a1 = a.makeSet("1");
|
||||
System.out.println(a);
|
||||
Set<String> a2 = a.makeSet("2");
|
||||
System.out.println(a);
|
||||
Set<String> a3 = a.makeSet("3");
|
||||
System.out.println(a);
|
||||
Set<String> a4 = a.makeSet("4");
|
||||
System.out.println(a);
|
||||
|
||||
Set<String> out;
|
||||
out = a.union(a1,a2);
|
||||
System.out.println(a);
|
||||
out = a.union(out,a3);
|
||||
System.out.println(a);
|
||||
out = a.union(out,a4);
|
||||
System.out.println(a);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user