public final class TimeInterval extends Object
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 and Description | 
|---|
| TimeInterval()Constructs an uninitialized  TimeInterval. | 
| TimeInterval(TimeInterval other) | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
public TimeInterval(TimeInterval other)
public TimeInterval()
TimeInterval.public TimeInterval setBeginning(@Nullable PointOfTime beginning)
IllegalStateException - The beginning is inconsistent with this object's duration and ending,
                               i.e. all three are non-null, and beginning + duration != endingpublic TimeInterval setDuration(@Nullable Duration duration)
IllegalStateException - The duration is inconsistent with this object's beginning and ending,
                               i.e. all three are non-null, and beginning + duration != endingpublic TimeInterval setEnding(@Nullable PointOfTime ending)
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()
Copyright © 2018 Arno Unkrig. All rights reserved.