pop.data
Class MortalityFile

java.lang.Object
  |
  +--pop.data.MortalityFile

public class MortalityFile
extends java.lang.Object
implements MortalityFactory

Creates Mortality objects from files on disk.

See Also:
MortalityFactory, Serialized Form

Constructor Summary
MortalityFile(java.lang.String name)
          Constructor to open and read a named file.
 
Method Summary
 PopulationCharacteristics get_characteristics(int category)
          Returns a new Mortality object for the indicated population category.
 PopulationCharacteristics get_characteristics(java.lang.String category)
          Returns a new Mortality object for the indicated population category.
 Mortality get_mortality(int category)
          Returns a new Mortality object for the indicated population category.
 Mortality get_mortality(java.lang.String category)
          Returns a new Mortality object for the indicated population category.
 boolean ready()
          Simply returns true at present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MortalityFile

public MortalityFile(java.lang.String name)
Constructor to open and read a named file. preconditions: file exists, and data in the file are organized as plain text in rows and columns (the number of rows must be >= the number of age groups in the current model, and each row must contain twice as many values as the number of population categories in the current model.
Parameters:
name - - the name of the file.
Method Detail

get_mortality

public Mortality get_mortality(int category)
Returns a new Mortality object for the indicated population category. precondition: category is valid.
Specified by:
get_mortality in interface MortalityFactory

get_mortality

public Mortality get_mortality(java.lang.String category)
Returns a new Mortality object for the indicated population category. precondition: category is valid.
Specified by:
get_mortality in interface MortalityFactory

get_characteristics

public PopulationCharacteristics get_characteristics(int category)
Returns a new Mortality object for the indicated population category. precondition: category is valid.

get_characteristics

public PopulationCharacteristics get_characteristics(java.lang.String category)
Returns a new Mortality object for the indicated population category. precondition: category is valid.

ready

public boolean ready()
Simply returns true at present.