pop.data
Class FertilityFile
java.lang.Object
|
+--pop.data.FertilityFile
- public class FertilityFile
- extends java.lang.Object
- implements FertilityFactory
Creates Fertility objects from files on disk.
- See Also:
FertilityFactory
, Serialized Form
Constructor Summary |
FertilityFile(java.lang.String name)
Constructor to open and read a named file. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FertilityFile
public FertilityFile(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, plus one), and each row must contain
as many values as the number of population categories
in the current model.
- Parameters:
name
- - the name of the file.
get_fertility
public Fertility get_fertility(int category)
- Returns a new Fertility object for the indicated
population category.
precondition: category is valid.
- Specified by:
- get_fertility in interface FertilityFactory
get_fertility
public Fertility get_fertility(java.lang.String category)
- Returns a new Fertility object for the indicated
population category.
precondition: category is valid.
- Specified by:
- get_fertility in interface FertilityFactory
get_characteristics
public PopulationCharacteristics get_characteristics(int category)
- Returns a new Fertility object for the indicated
population category.
precondition: category is valid.
get_characteristics
public PopulationCharacteristics get_characteristics(java.lang.String category)
- Returns a new Fertility object for the indicated
population category.
precondition: category is valid.
ready
public boolean ready()
- Simply returns true at present.