|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.episodic.episodes.AgeInterval
public class AgeInterval
The AgeInterval class contains information about the age of
a chronobag. Age of all episodes in chronobag should be at least
minAge and at most maxAge days.
An instance of this class exist in each Chronobag instance.
| Constructor Summary | |
|---|---|
AgeInterval(int min,
int max)
Instantiate the class by providing the ends of age interval. |
|
| Method Summary | |
|---|---|
int |
getMaxAge()
Getter method for maxAge variable. |
int |
getMinAge()
Getter method for minAge variable. |
void |
increase()
Increases the values of minAge and maxAge by one. |
boolean |
intersects(AgeInterval b)
Checks if there is non-zero intersection between the current and the specified interval. |
AgeInterval |
join(AgeInterval other)
Joins the interval with another Age Interval. |
String |
toString()
Returns a String object representing this
AgeInterval's value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AgeInterval(int min,
int max)
Both bounds should be zero in case of the chronobag representing the current day. (Episodes are zero days old).
min - Minimum age of episodes.max - Maximum age of episodes.| Method Detail |
|---|
public int getMinAge()
public int getMaxAge()
public boolean intersects(AgeInterval b)
b - An interval to check the intersection with.
public AgeInterval join(AgeInterval other)
Age Interval.
If there is no intersection between the two intervals,
their union will not be an interval.
other - Interval to join with.
null.public void increase()
minAge and maxAge by one.
In other words, increases the age of interval by one day.
public String toString()
String object representing this
AgeInterval's value. The lower and upper bounds
both appears in the representation.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||