package customiteratorobject;

import java.util.ArrayList;
import java.util.Arrays;

public class TestMain {
	public static void printTest(ArrayList<Footman> fs) {
		for (Footman fm : fs) {
			for (String att : fm.getAttributes()) {
				System.out.print(att + " ");
			};
			System.out.println();
		}
	}
	
	public static void main(String[] args) {
		// Make some footman for testing.
		Footman f1 = new Footman(1, 1, 1);
		Footman f2 = new Footman(2, 3, 3);
		Footman f3 = new Footman(3, 2, 2);
		
		ArrayList<Footman> fs = new ArrayList(3);
		fs.addAll(Arrays.asList(f1, f2, f3));
		printTest(fs);
		
		System.out.println("-------------Now Sort It-------------");
		fs.sort(f1);
	}
}
