import hiro.yoshioka.sql.resource.DBRoot;
import hiro.yoshioka.sql.resource.IDBSchema;
import hiro.yoshioka.sql.resource.IDBTable;

import java.util.ArrayList;

public class SetTExt {

	public static void main(String[] args) {
//		Comparator<IDBTable> comp = new Comparator<IDBTable>() {
//			public int compare(IDBTable arg0, IDBTable arg1) {
//				return arg0.getName().compareTo(arg1.getName());
//			}
//		};
//		Set<IDBTable> set = new TreeSet<IDBTable>(comp);
		ArrayList<IDBTable> set = new ArrayList<IDBTable>();
		DBRoot root = MockGenerator.generateDBRoot();
		IDBSchema[] schemas = root.getSchemas();
		IDBTable[] tables = schemas[0].getTableOrViews();
		for (IDBTable table : tables) {
			set.add(table);
		}
		set.add(tables[0]);
		set.add(tables[2]);
		set.add(tables[1]);
		set.add(tables[0]);
		System.out.println(set);
	}
}
