pt.digitalis.sampleApp.util.stats
Class StatsGenerator

java.lang.Object
  extended by pt.digitalis.sampleApp.util.stats.StatsGenerator

public class StatsGenerator
extends Object

Author:
Pedro Viegas pviegas@digitalis.pt

Constructor Summary
StatsGenerator(pt.digitalis.log.ILogWrapper logger)
          Constructor
 
Method Summary
 void addSerie(Series serie)
          Add a serie to the list
 void addSerie(String name, long[] values)
          Add a group of values to the list
 void buildChartData(int xCount)
          Reads the series and created new chart data.
 void createChartAsPNG(String fileName)
          Creates a Line Chart and saves it to disk
 void exportToExcel(String fileName)
          Exports the stats to Excel
 void printAsciiChart()
          Prints an ascii art chart to the standard output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsGenerator

public StatsGenerator(pt.digitalis.log.ILogWrapper logger)
Constructor

Parameters:
logger - the logger to use
Method Detail

addSerie

public void addSerie(Series serie)
Add a serie to the list

Parameters:
serie -

addSerie

public void addSerie(String name,
                     long[] values)
Add a group of values to the list

Parameters:
name -
values -

buildChartData

public void buildChartData(int xCount)
Reads the series and created new chart data. Overrides previous ones if they existed

Parameters:
xCount - the total of X values desired (precision)

exportToExcel

public void exportToExcel(String fileName)
Exports the stats to Excel

Parameters:
fileName - the name of the EXCEL file to export to

createChartAsPNG

public void createChartAsPNG(String fileName)
Creates a Line Chart and saves it to disk

Parameters:
fileName - the name of the image file to export to

printAsciiChart

public void printAsciiChart()
Prints an ascii art chart to the standard output



Copyright © 2009 Digitalis Informática Lda. All Rights Reserved.