|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound uk.ac.leeds.ccg.andyt.projects.genesis.society.demography.GENESIS_AgeBound
public final class GENESIS_AgeBound
A class for age limits. The ageMin and ageMax are stored as relative times. If ageMax is null then the age limit is open ended in that any age older than ageMin belongs to the bound. The ageMax is used in an exclusive bound, while ageMin is used as an inclusive bound. Such bounding allows ageMax to be stored more neatly in the expected general usage. It also allows time to be extended to store sub second values in a potential future refactoring without perhaps so many major changes being required.
Field Summary | |
---|---|
protected uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time |
ageMaxBound
For storing the maximum outer bound of an age. |
protected uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time |
ageMinBound
For storing the minimum outer bound of an age. |
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound |
---|
ageMax, ageMin |
Constructor Summary | |
---|---|
GENESIS_AgeBound()
|
|
GENESIS_AgeBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound aAgeBound)
|
|
GENESIS_AgeBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound aAgeBound,
GENESIS_Environment _GENESIS_Environment)
|
|
GENESIS_AgeBound(GENESIS_AgeBound aGENESIS_AgeBound)
|
|
GENESIS_AgeBound(java.lang.Long ageInYears)
ageInYears is an age in years. |
|
GENESIS_AgeBound(java.lang.Long ageInYearsMin,
java.lang.Long ageInYearsMax)
this.ageMin = new GENESIS_Time(CommonFactory.newTime(ageInYearsMin));
this.ageMax = new GENESIS_Time(CommonFactory.newTime(ageInYearsMax + 1L)); |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Two GENESIS_AgeBounds are equivalent if all their fields are. |
boolean |
equals(java.lang.Object o)
Overrides equals in Object. |
uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time |
getAgeMaxBound()
|
uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time |
getAgeMinBound()
|
static GENESIS_AgeBound |
getContainingAgeBound(GENESIS_AgeBound ageBound,
java.util.TreeMap<GENESIS_AgeBound,?> map)
Returns a copy of the broader GENESIS_AgeBound into which ageBound fits. |
int |
hashCode()
|
void |
setAgeMaxBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMaxBound)
|
void |
setAgeMinBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMinBound)
|
java.lang.String |
toString()
|
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound |
---|
getAgeMax, getAgeMin, setAgeMax, setAgeMin |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMinBound
protected uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMaxBound
Constructor Detail |
---|
public GENESIS_AgeBound()
public GENESIS_AgeBound(GENESIS_AgeBound aGENESIS_AgeBound)
public GENESIS_AgeBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound aAgeBound)
public GENESIS_AgeBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.AgeBound aAgeBound, GENESIS_Environment _GENESIS_Environment)
public GENESIS_AgeBound(java.lang.Long ageInYears)
this.ageMin = new GENESIS_Time(CommonFactory.newTime(ageInYears));
this.ageMax = new GENESIS_Time(CommonFactory.newTime(ageInYears + 1));
ageInYears
- public GENESIS_AgeBound(java.lang.Long ageInYearsMin, java.lang.Long ageInYearsMax)
this.ageMin = new GENESIS_Time(CommonFactory.newTime(ageInYearsMin));
this.ageMax = new GENESIS_Time(CommonFactory.newTime(ageInYearsMax + 1L));
ageInYearsMin
- ageInYearsMax
- Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time getAgeMinBound()
public void setAgeMinBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMinBound)
public uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time getAgeMaxBound()
public void setAgeMaxBound(uk.ac.leeds.ccg.andyt.projects.genesis.io.schema.common.Time ageMaxBound)
public static GENESIS_AgeBound getContainingAgeBound(GENESIS_AgeBound ageBound, java.util.TreeMap<GENESIS_AgeBound,?> map)
ageBound
- map
-
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
-
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
-
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |