package jcf_set.example;

import java.util.Comparator;
import java.util.TreeSet;

public class TreeSetExample2 {
	
	public static void main(String[] Args) {
		
	}
	
	public void run() {
		
		// Tree1
		TreeSet<String> tree1 = new TreeSet<String>();
		
		tree1.add("yes");
		tree1.add("no");
		tree1.add("maybe");
		tree1.add("always");
		tree1.add("no");
		
		System.out.println("Stampa del TreeSet1: ");
		System.out.println(tree1);
		
		// Tree2
		TreeSet<String> tree2 = new TreeSet<String>(tree1);
		
		System.out.println("Stampa del TreeSet1: ");
		System.out.println(tree1);
		
		// Tree3
		TreeSet<String> tree3 = new TreeSet<String>(new Decreasing());
		tree3.addAll(tree2);
		
		System.out.println("Stampa del TreeSet1: ");
		System.out.println(tree1);
		
	}
	
}
