|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pop.model.Constants
A way to encapsulate the model's constants, especially for writing and reading as a whole.
Constructor Summary | |
Constants(Constants c)
Construct a copy of the Constants object. |
|
Constants(int maximum_age,
int categories,
java.lang.String[] category_names,
int years,
int base_year,
java.lang.String model_title)
Basic constructor. |
Method Summary | |
int |
base_year()
Base year of the model (for display). |
int |
categories()
Number of population categories. |
java.lang.String |
category_name(int number)
Returns copy of the indicated category name. |
java.lang.String[] |
category_names()
Category names. |
int |
maximum_age()
Maximum cohort age. |
java.lang.String |
model_title()
Title of the model (for display). |
boolean |
valid_category(int number)
True if category number is in valid range (0 to number of categories - 1). |
int |
years()
Number of years to run the model. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Constants(int maximum_age, int categories, java.lang.String[] category_names, int years, int base_year, java.lang.String model_title)
maximum_age
- - age corresponding to oldest cohorts
(e.g., 100 if final age segment is "100+").categories
- - number of population categories.cagegory_names
- - strings to identify each category;
MUST be of length categories.years
- - number of years to execute model.base_year
- - year corresponding to base population.model_title
- - a title for display.public Constants(Constants c)
Method Detail |
public int maximum_age()
public int categories()
public java.lang.String[] category_names()
public java.lang.String category_name(int number)
number
- - category number, in the range of
0 to categories()-1.public int years()
public int base_year()
public java.lang.String model_title()
public boolean valid_category(int number)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |