|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.util.time.TimeInterval
public final class TimeInterval
A time interval has an optional beginning, an optional duration and an optional ending.
An 'undefined time interval' has neither a beginning, duration nor ending.
A 'defined time interval' has a beginning, a duration and an ending, which are consistent with each other, i.e. beginning + duration = ending.
A 'half-defined' time interval has
| Constructor Summary | |
|---|---|
TimeInterval()
Constructs an uninitialized TimeInterval. |
|
TimeInterval(TimeInterval other)
|
|
| Method Summary | |
|---|---|
PointOfTime |
getBeginning()
The beginning of this time interval |
Duration |
getDuration()
The duration of this time interval |
PointOfTime |
getEnding()
The ending of this time interval |
TimeInterval |
setBeginning(PointOfTime beginning)
Changes the beginning of this interval. |
TimeInterval |
setDuration(Duration duration)
Changes the duration of this interval. |
TimeInterval |
setEnding(PointOfTime ending)
Changes the ending of this interval. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeInterval(TimeInterval other)
public TimeInterval()
TimeInterval.
| Method Detail |
|---|
public TimeInterval setBeginning(@Nullable
PointOfTime beginning)
java.lang.IllegalStateException - The beginning is inconsistent with this object's duration and ending, i.e.
all three are non-null, and beginning + duration != ending
public TimeInterval setDuration(@Nullable
Duration duration)
java.lang.IllegalStateException - The duration is inconsistent with this object's beginning and ending, i.e.
all three are non-null, and beginning + duration != ending
public TimeInterval setEnding(@Nullable
PointOfTime ending)
java.lang.IllegalStateException - The ending is inconsistent with this object's beginning and duration, i.e.
all three are non-null, and beginning + duration != ending@Nullable public PointOfTime getBeginning()
@Nullable public Duration getDuration()
@Nullable public PointOfTime getEnding()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||