de.cesr.lara.toolbox.io
Class SimpleCsvOutput

java.lang.Object
  extended by de.cesr.lara.toolbox.io.SimpleCsvOutput
All Implemented Interfaces:
LaraAbstractEventSubscriber, LaraEventSubscriber

public class SimpleCsvOutput
extends Object
implements LaraEventSubscriber

simple output. creates csv-file and provides method to append one line


Constructor Summary
SimpleCsvOutput(String modelName)
          Will create a new simple csv output.
 
Method Summary
 void append(String filename, String value)
          appends one line with the value String to the file
<T extends LaraEvent>
void
onEvent(T event)
          Will be called with an event as a parameter when an event the subscriber subscribed to occurs.
 void subscribeToEvent(Class<? extends LaraEvent> eventClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCsvOutput

public SimpleCsvOutput(String modelName)
Will create a new simple csv output. Files will be written in [model base dir]/[modelName]

Parameters:
modelName -
Method Detail

append

public void append(String filename,
                   String value)
appends one line with the value String to the file

Parameters:
value -

onEvent

public <T extends LaraEvent> void onEvent(T event)
Description copied from interface: LaraEventSubscriber
Will be called with an event as a parameter when an event the subscriber subscribed to occurs. Implement this to react on events. Typically you would start doing something like if (event instanceof VeryInterestingEvent) { //do something smart }

Specified by:
onEvent in interface LaraEventSubscriber

subscribeToEvent

public void subscribeToEvent(Class<? extends LaraEvent> eventClass)