public static ExampleFormatter compile(String formatString,ExampleSet exampleSet,int fractionDigits,boolean quoteWhitespace) throws FormatterException {
  List<FormatCommand> commandList=new LinkedList<FormatCommand>();
  compile(formatString,exampleSet,commandList,fractionDigits,quoteWhitespace);
  FormatCommand[] commands=new FormatCommand[commandList.size()];
  commandList.toArray(commands);
  return new ExampleFormatter(commands);
}

public static ExampleFormatter compile ( String formatString , ExampleSet exampleSet , int fractionDigits , boolean quoteWhitespace ) throws FormatterException { List < FormatCommand > commandList = new LinkedList < FormatCommand > ( ) ; compile ( formatString , exampleSet , commandList , fractionDigits , quoteWhitespace ) ; FormatCommand [ ] commands = new FormatCommand [ commandList . size ( ) ] ; commandList . toArray ( commands ) ; return new ExampleFormatter ( commands ) ; }
factory method that compiles a format string and creates an instance of exampleformatter .
