package com.SemNomeAindaCartolaFC;

import com.SemNomeAindaCartolaFC.Athletes.*;

import java.io.PrintWriter;

public class SemNomeAindaCartolaFCMain {

	static public void main(String[] args) throws Exception {

		/*
		// How to use methods and classes...
		AthleteFactory factory = new AthleteFactory("path/to/athltesJsonBase.json");
		Athlete[] athletes = factory.createAthletesDataUpTo(1000);
		AthletesContainer container = new AthletesContainer();
		container.addAthletes(athletes);
		container.sort(new QuickSortAthletes);
		// now the container has sorted all athletes...
		* */
		PrintWriter output = new PrintWriter("resultados_SemNomeAinda.txt", "UTF-8");
		AthleteFactory factory = new AthleteFactory("data/25-09-2016.json");

		Athlete[] athletes = factory.createAthletesDataUpTo(1000);


		AthletesContainer container = new AthletesContainer();
		container.setTimeFilePrinter(output);
		container.addAthletes(athletes);

		container.sortWith(new HeapSortAthletes());
		ClassifyAthletesAlgorithm classifyAlgorithm = new ClassifyByPosition();
		classifyAlgorithm.setName("HPST");
		container.classifyByProperty(classifyAlgorithm);



		output.close();
	}
}

@@ -732,16 +732,127 @@
 son%22);%0A%0A
+%09%09int maxAthletes = 100000;%0A%09%09for(int upToAthletes = 100; upToAthletes %3C= maxAthletes; upToAthletes *= 10) %7B%0A%0A%09
 %09%09Athlet
@@ -901,17 +901,31 @@
 pTo(
-1000);%0A%0A%0A
+upToAthletes);%0A%0A%09%09%09%7B%0A%09%09
 %09%09At
@@ -969,32 +969,34 @@
 tesContainer();%0A
+%09%09
 %09%09container.setT
@@ -1019,16 +1019,18 @@
 utput);%0A
+%09%09
 %09%09contai
@@ -1057,16 +1057,18 @@
 etes);%0A%0A
+%09%09
 %09%09contai
@@ -1105,16 +1105,18 @@
 tes());%0A
+%09%09
 %09%09Classi
@@ -1181,16 +1181,18 @@
 tion();%0A
+%09%09
 %09%09classi
@@ -1220,16 +1220,18 @@
 HPST%22);%0A
+%09%09
 %09%09contai
@@ -1273,17 +1273,392 @@
 rithm);%0A
-%0A
+%09%09%09%7D%0A%0A%09%09%09%7B%0A%09%09%09%09AthletesContainer container = new AthletesContainer();%0A%09%09%09%09container.setTimeFilePrinter(output);%0A%09%09%09%09container.addAthletes(athletes);%0A%0A%09%09%09%09container.sortWith(new QuickSortAthletes());%0A%09%09%09%09ClassifyAthletesAlgorithm classifyAlgorithm = new ClassifyByPosition();%0A%09%09%09%09classifyAlgorithm.setName(%22QSRM%22);%0A%09%09%09%09container.classifyByProperty(classifyAlgorithm);%0A%09%09%09%7D%0A%0A%09%09%7D
 %0A%0A%09%09outp

Print results