Class DataSetFormatter1

java.lang.Object
com.github.gbenroscience.parser.DataSetFormatter1

public class DataSetFormatter1 extends Object
Objects of this class take a data-set and simplify/reduce its complexity so that class MathExpression can easily work with it. The ultimate goal is to convert every data in the data-set into a number or a simple variable.
Since:
Sunday August 07 2011
Author:
JIBOYE Oluwagbemiro Olaoluwa
  • Field Details

    • COMMA_MASK

      public static final String COMMA_MASK
      used to mask the commas after they have been processed.
      See Also:
    • OPEN_BRACKET_MASK

      public static final String OPEN_BRACKET_MASK
      used to mask the commas after they have been processed.
      See Also:
    • CLOSE_BRACKET_MASK

      public static final String CLOSE_BRACKET_MASK
      used to mask the commas after they have been processed.
      See Also:
  • Constructor Details

    • DataSetFormatter1

      public DataSetFormatter1(String text)
      Takes a comma separated string of data values and scans them into its dataset attribute.
      Parameters:
      text - A comma separated data set. e.g 2,3,......or sort(2,3,1,5,...) or mode(1,8,...)
  • Method Details

    • setDataset

      public void setDataset(ArrayList<String> dataset)
    • getDataset

      public List<String> getDataset()
    • getFormattedDataSet

      public String getFormattedDataSet()
      Returns:
      a formatted data-set.
    • main

      public static void main(String[] args)