eos.io.printer
Class Printer

Object
  extended by eos.io.printer.Printer
Direct Known Subclasses:
BankPrinter, ConsumerMktPricePrinter, ConsumerMktVolPrinter, FirmsPrinter, LaborersPrinter

public abstract class Printer
extends Object

Parent class of all printers

Author:
zhihongx

Field Summary
protected  int end
          ending time step
protected  int period
          interval (in steps) between two printing
protected  int start
          starting time step
 
Constructor Summary
Printer(int period)
          Create a new printer that prints every period steps from the first step till the last step
Printer(int period, int start)
          Create a new printer that prints every period steps from the start step till the last step
Printer(int period, int start, int end)
          Create a new printer that prints every period steps from the start step till the end step.
 
Method Summary
abstract  void cleanup()
          Clean up the printer
 int getEnd()
          Return the ending step of this Printer
abstract  String getFileName()
          Return the name of the output file.
 int getPeriod()
          Return the period of this Printer
 int getStart()
          Return the starting step of this Printer
abstract  void print()
          Print data, called by Economy at each time step
abstract  void printTitles()
          Print column titles
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

period

protected final int period
interval (in steps) between two printing


start

protected final int start
starting time step


end

protected final int end
ending time step

Constructor Detail

Printer

public Printer(int period,
               int start,
               int end)
Create a new printer that prints every period steps from the start step till the end step.

Parameters:
period - number of steps between two prints
start - starting time step
end - ending time step

Printer

public Printer(int period,
               int start)
Create a new printer that prints every period steps from the start step till the last step

Parameters:
period - number of steps between two prints
start - starting time step

Printer

public Printer(int period)
Create a new printer that prints every period steps from the first step till the last step

Parameters:
period - number of steps between two printing
Method Detail

getPeriod

public int getPeriod()
Return the period of this Printer

Returns:
the period of this Printer

getStart

public int getStart()
Return the starting step of this Printer

Returns:
the starting step of this Printer

getEnd

public int getEnd()
Return the ending step of this Printer

Returns:
the ending step of this Printer

printTitles

public abstract void printTitles()
Print column titles


print

public abstract void print()
Print data, called by Economy at each time step


cleanup

public abstract void cleanup()
Clean up the printer


getFileName

public abstract String getFileName()
Return the name of the output file.

Returns:
the name of the output file