|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.ac.tuwien.cs.ztimeview.time.TimeInterval
Class representing a time interval and implementing the Allen's relations
Field Summary | |
static java.lang.String |
MILLISECONDS
|
Constructor Summary | |
TimeInterval()
Default constructor |
|
TimeInterval(java.util.Date start,
java.util.Date end)
Constructor |
|
TimeInterval(Interval interval)
Constructor |
Method Summary | |
boolean |
after(java.util.Date t)
Determine if given instant is before interval |
boolean |
after(TimeInterval i)
Determine if this interval is after the given one |
static boolean |
areEqual(Interval i1,
Interval i2)
Determine if the provided intervals are equal |
boolean |
before(java.util.Date t)
Determine if given instant is after interval |
boolean |
before(TimeInterval i)
Determine if this interval is before the given one |
boolean |
contains(java.util.Date t)
Determine if given instant is within interval |
boolean |
contains(TimeInterval i)
Determine if this interval contains the given one |
boolean |
during(TimeInterval i)
Determine if this interval is during the given one |
boolean |
equals(TimeInterval i)
Determine if this interval equals the given one |
boolean |
finishedBy(TimeInterval i)
Determine if this interval is finished by the given one |
boolean |
finishes(TimeInterval i)
Determine if this interval finishes the given one |
long |
getDuration()
Get the duration of the interval |
static long |
getDuration(Interval interval)
Get the duration of the interval |
java.util.Date |
getEnd()
Get end of plan |
java.util.Date |
getStart()
Get start time |
boolean |
meets(TimeInterval i)
Determine if this interval meets the given one |
boolean |
metBy(TimeInterval i)
Determine if this interval is met by the given one |
boolean |
overlappedBy(TimeInterval i)
Determine if this interval is overlapped by the given one |
boolean |
overlaps(TimeInterval i)
Determine if this interval overlaps the given one |
void |
setEnd(java.util.Date end)
Set end of plan |
void |
setStart(java.util.Date start)
Set start time |
boolean |
startedBy(TimeInterval i)
Determine if this interval is started by the given one |
boolean |
starts(TimeInterval i)
Determine if this interval starts the given one |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MILLISECONDS
Constructor Detail |
public TimeInterval() throws java.lang.IllegalArgumentException
public TimeInterval(Interval interval) throws java.lang.IllegalArgumentException
interval
- time intervalpublic TimeInterval(java.util.Date start, java.util.Date end) throws java.lang.IllegalArgumentException
start
- start time of intervalend
- end time of intervalMethod Detail |
public static boolean areEqual(Interval i1, Interval i2)
public boolean equals(TimeInterval i)
i
- interval to comparepublic boolean before(TimeInterval i)
i
- interval to comparepublic boolean after(TimeInterval i)
i
- interval to comparepublic boolean meets(TimeInterval i)
i
- interval to comparepublic boolean metBy(TimeInterval i)
i
- interval to comparepublic boolean overlaps(TimeInterval i)
i
- interval to comparepublic boolean overlappedBy(TimeInterval i)
i
- interval to comparepublic boolean starts(TimeInterval i)
i
- interval to comparepublic boolean startedBy(TimeInterval i)
i
- interval to comparepublic boolean during(TimeInterval i)
i
- interval to comparepublic boolean contains(TimeInterval i)
i
- interval to comparepublic boolean finishes(TimeInterval i)
i
- interval to comparepublic boolean finishedBy(TimeInterval i)
i
- interval to comparepublic boolean contains(java.util.Date t)
t
- instant to testpublic boolean after(java.util.Date t)
t
- instant to testpublic boolean before(java.util.Date t)
t
- instant to testpublic long getDuration()
public static long getDuration(Interval interval)
interval
- Interval to calculate duration for
public void setStart(java.util.Date start) throws java.lang.IllegalArgumentException
setStart
in interface Interval
start
- start time of plan
java.lang.IllegalArgumentException
public java.util.Date getStart()
getStart
in interface Interval
public void setEnd(java.util.Date end)
setEnd
in interface Interval
end
- end of planpublic java.util.Date getEnd()
getEnd
in interface Interval
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |