net.talvi.puffinplot.data.file
Class ZplotLoader

java.lang.Object
  extended by net.talvi.puffinplot.data.file.ZplotLoader
All Implemented Interfaces:
FileLoader

public class ZplotLoader
extends java.lang.Object

A file loader for the file format used by Steve Hurst's Zplot program.


Field Summary
protected  java.util.List<Datum> data
           
protected  java.util.List<java.lang.String> messages
           
 
Constructor Summary
ZplotLoader(java.io.File file)
          Creates a new Zplot loader to read a specified file.
 
Method Summary
protected  void addDatum(Datum d)
           
protected  void addMessage(java.lang.String message, java.lang.Object... args)
           
 java.util.List<Datum> getData()
          Returns the data points read from the file.
 java.util.List<java.lang.String> getExtraLines()
          Returns any lines in the file which were not handled by the loader.
 java.util.List<java.lang.String> getMessages()
          Returns any messages produced during the loading process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

protected java.util.List<java.lang.String> messages

data

protected java.util.List<Datum> data
Constructor Detail

ZplotLoader

public ZplotLoader(java.io.File file)
Creates a new Zplot loader to read a specified file.

Parameters:
file - the Zplot file to read
Method Detail

addMessage

protected void addMessage(java.lang.String message,
                          java.lang.Object... args)

addDatum

protected void addDatum(Datum d)

getData

public java.util.List<Datum> getData()
Description copied from interface: FileLoader
Returns the data points read from the file.

Specified by:
getData in interface FileLoader
Returns:
the data points read from the file

getExtraLines

public java.util.List<java.lang.String> getExtraLines()
Description copied from interface: FileLoader
Returns any lines in the file which were not handled by the loader.

Specified by:
getExtraLines in interface FileLoader
Returns:
any lines in the file which were not handled by the loader

getMessages

public java.util.List<java.lang.String> getMessages()
Description copied from interface: FileLoader
Returns any messages produced during the loading process.

Specified by:
getMessages in interface FileLoader
Returns:
any messages produced during the loading process