eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class Stats

java.lang.Object
  |
  +--mss.ea.stat.Stats

public abstract class Stats
extends java.lang.Object

Abstract base class for a statistical operator. Subclasses can should be used to send data of all kinds to an output stream.

Since:
0.1
Version:
0.1 (08-28-2000)
Author:
Andreas Rummler

Field Summary
protected  java.io.PrintStream ps
          PrintStream, to write data to.
protected  java.lang.String sep
          Seperator between fields in datafiles.
 
Constructor Summary
Stats()
          Constructor.
Stats(java.io.PrintStream stream)
          Constructor with output stream.
Stats(java.lang.String filename)
          Constructor with output file.
 
Method Summary
 void closeStream()
          Closes the output stream.
 void flushStream()
          Flushes the output stream.
 java.lang.String getSeparator()
          Gets the current separator.
 void setSeparator(java.lang.String separator)
          Sets a new separator.
abstract  void writeData()
          Abstract method for writing data to the output stream.
abstract  void writeHeader()
          Abstract method to write a describing header to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ps

protected java.io.PrintStream ps
PrintStream, to write data to.

sep

protected java.lang.String sep
Seperator between fields in datafiles.
Constructor Detail

Stats

public Stats()
Constructor. The output stream is set to System.out.

Stats

public Stats(java.io.PrintStream stream)
Constructor with output stream.
Parameters:
stream - output stream

Stats

public Stats(java.lang.String filename)
Constructor with output file. If opening of the file fails, the output stream is set to System.out.
Parameters:
filename - name of output file
Method Detail

closeStream

public void closeStream()
Closes the output stream.

flushStream

public void flushStream()
Flushes the output stream.

writeHeader

public abstract void writeHeader()
Abstract method to write a describing header to the output stream. This method should be called just after initializing the output stream.

writeData

public abstract void writeData()
Abstract method for writing data to the output stream.

getSeparator

public java.lang.String getSeparator()
Gets the current separator.
Returns:
current separator

setSeparator

public void setSeparator(java.lang.String separator)
Sets a new separator.
Parameters:
separator - new separator

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS