pop.data
Class MigrationFile

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

public class MigrationFile
extends java.lang.Object
implements MigrationFactory

Creates Migration objects from files on disk in FULL format (with values for each age and sex cohort for each year).

See Also:
MigrationFactory, Serialized Form

Constructor Summary
MigrationFile(java.lang.String name)
          Constructor to open and read a named file in FULL format.
 
Method Summary
 PopulationCharacteristics get_characteristics(int category)
          Returns a new Migration object for the indicated population category and the current year of the model.
 PopulationCharacteristics get_characteristics(java.lang.String category)
          Returns a new Migration object for the indicated population category and the current year of the model.
 Migration get_migration(int category, int year)
          Returns a new Migration object for the indicated population category and year.
 Migration get_migration(java.lang.String category, int year)
          Returns a new Migration object for the indicated population category and year.
 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

MigrationFile

public MigrationFile(java.lang.String name)
Constructor to open and read a named file in FULL format. preconditions: file exists, and data in the file are organized as plain text in rows and columns (the number of rows must be >= (years * ages) 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_migration

public Migration get_migration(int category,
                               int year)
Returns a new Migration object for the indicated population category and year. preconditions: category and year are valid for the current model.
Specified by:
get_migration in interface MigrationFactory

get_migration

public Migration get_migration(java.lang.String category,
                               int year)
Returns a new Migration object for the indicated population category and year. preconditions: category and year are valid for the current model.
Specified by:
get_migration in interface MigrationFactory

get_characteristics

public PopulationCharacteristics get_characteristics(int category)
Returns a new Migration object for the indicated population category and the current year of the model. Note: you must use the get_migration() version to specify a year other than the current model year. preconditions: category and year are valid for the current model.

get_characteristics

public PopulationCharacteristics get_characteristics(java.lang.String category)
Returns a new Migration object for the indicated population category and the current year of the model. Note: you must use the get_migration() version to specify a year other than the current model year. preconditions: category and year are valid for the current model.

ready

public boolean ready()
Simply returns true at present.