databionics.io
Class ListFile

java.lang.Object
  extended by databionics.io.BaseFile
      extended by databionics.io.ListFile
Direct Known Subclasses:
ColorTable, ExplFile, MapFile, RuleFile

public abstract class ListFile
extends BaseFile

Base class for files with lists.


Field Summary
protected  java.util.List data
          List containing the data.
protected static org.apache.log4j.Logger log
          Log4j logging.
 
Fields inherited from class databionics.io.BaseFile
allowEmptyLines, comment, commentPrefix, delimiter, delimiters, file, header, headerPrefix, loc, nf
 
Constructor Summary
ListFile()
          Standard constructor
ListFile(java.lang.String filename)
          Constructor with a filename
 
Method Summary
protected  java.lang.String buildLine(int row)
          Construct a line for saving.
 java.util.List getData()
          Get the data list.
 int getSize()
          Get the number of lines in file.
 void setData(java.util.List data)
          Set the data list.
 
Methods inherited from class databionics.io.BaseFile
buildHeader, checkHeader, checkHeaderAgainstSize, getComment, getFile, getFilename, getHeader, getLocale, getNumberFormat, init, isHeader, isNaN, isNumber, load, load, parseError, parseHeader, parseLine, save, save, setComment, setFilename, setLocale, writeStringList, writeStringList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Log4j logging.


data

protected java.util.List data
List containing the data.

Constructor Detail

ListFile

public ListFile()
Standard constructor


ListFile

public ListFile(java.lang.String filename)
Constructor with a filename

Parameters:
filename - Name of the file
Method Detail

buildLine

protected java.lang.String buildLine(int row)
Construct a line for saving. Delegates string representation of an item to subclasses.

Overrides:
buildLine in class BaseFile
Parameters:
row - Number of current line.
Returns:
Line with that number.

getData

public java.util.List getData()
Get the data list.


setData

public void setData(java.util.List data)
Set the data list.


getSize

public int getSize()
Get the number of lines in file.

Overrides:
getSize in class BaseFile
Returns:
Number of lines in file.


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.