package org.uma.jmetal.auto.irace;

import org.uma.jmetal.auto.irace.crossover.CrossoverParameter;
import org.uma.jmetal.auto.irace.mutation.MutationParameter;
import org.uma.jmetal.auto.irace.selection.SelectionParameter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class GenerateIraceParameterFile {
  public static void main(String[] args) {
    List<Parameter> parameterList = new ArrayList<>() ;
    parameterList.add(new CrossoverParameter()) ;
    parameterList.add(new MutationParameter()) ;
    parameterList.add(new SelectionParameter()) ;
    parameterList.add(new Parameter(
        "offspringPopulationSize",
        "--offspringPopulationSize",
        ParameterType.i,
        "(1, 400)",
        "",
        Collections.emptyList())) ;

    for (Parameter parameter : parameterList) {
      System.out.println(parameter) ;

      for (Parameter relatedParameter : parameter.getAssociatedParameters()) {
        System.out.println(relatedParameter) ;
      }
    }
  }
}
@@ -437,17 +437,16 @@
 List%3C%3E()
- 
 ;%0A    pa
@@ -478,33 +478,32 @@
 overParameter())
- 
 ;%0A    parameterL
@@ -526,33 +526,32 @@
 tionParameter())
- 
 ;%0A    parameterL
@@ -583,17 +583,16 @@
 meter())
- 
 ;%0A    pa
@@ -603,24 +603,33 @@
 terList.add(
+%0A        
 new Paramete
@@ -639,16 +639,20 @@
         
+   
+ 
 %22offspri
@@ -662,32 +662,36 @@
 opulationSize%22,%0A
+    
         %22--offsp
@@ -719,16 +719,20 @@
         
+   
+ 
 Paramete
@@ -748,16 +748,20 @@
         
+    
 %22(1, 400
@@ -776,12 +776,20 @@
     
+   
+ 
 %22%22,%0A
+    
     
@@ -817,20 +817,75 @@
 List()))
- 
 ;%0A%0A
+    String formatString = %22%2540s %2540s %257s %2530s %2520s%5Cn%22 ;%0A
     for 
@@ -945,171 +945,1068 @@
 out.
-println(parameter) ;%0A%0A      for (Parameter relatedParameter : parameter.getAssociatedParameters()) %7B%0A        System.out.println(relatedParameter) ;%0A      %7D%0A    %7D%0A  %7D%0A%7D
+format(%0A          formatString,%0A          parameter.getName(),%0A          parameter.getSwitch(),%0A          parameter.getType(),%0A          parameter.getValidValues(),%0A          parameter.getConditionalParameters());%0A%0A      for (Parameter relatedParameter : parameter.getAssociatedParameters()) %7B%0A        System.out.format(%0A            formatString,%0A            relatedParameter.getName(),%0A            relatedParameter.getSwitch(),%0A            relatedParameter.getType(),%0A            relatedParameter.getValidValues(),%0A            relatedParameter.getConditionalParameters());%0A      %7D%0A    %7D%0A  %7D%0A%7D%0A/*%0ASystem.out.printf(%22%2510s %2530s %2520s %255s %255s%22, %22STUDENT ID%22, %22EMAIL ID%22, %22NAME%22, %22AGE%22, %22GRADE%22);%0A    System.out.println();%0A    System.out.println(%22-----------------------------------------------------------------------------%22);%0A    for(Student student: students)%7B%0A        System.out.format(%22%2510s %2530s %2520s %255d %255c%22,%0A                student.getId(), student.getEmailId(), student.getName(), student.getAge(), student.getGrade());%0A        System.out.println();%0A    %7D%0A */%0A

Improve output of class GenerateIraceParameterFile