|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.example.model.TimeInterval
public class TimeInterval
Constructor Summary | |
---|---|
TimeInterval(int sTime,
int eTime)
Constructor |
Method Summary | |
---|---|
int |
difference()
Returns the amount of time spanned by the interval. |
int |
getEnd()
Return interval's end time. |
java.lang.String |
getEndTimeString()
Converts the interval's end time from an integer in universal time to a string in standard time. |
int |
getStart()
Return interval's start time. |
java.lang.String |
getStartTimeString()
Converts the interval's start time from an integer in universal time to a string in standard time. |
boolean |
isAfter(TimeInterval times)
Checks if a particular time interval occurs completely after this interval. |
boolean |
isBefore(TimeInterval times)
Checks if a particular time interval occurs completely before this interval. |
boolean |
isDuring(TimeInterval times)
Checks if a particular time interval occurs completely during this interval. |
boolean |
isEndOut(TimeInterval times)
Checks if a particular time interval ends after this interval but starts during it. |
boolean |
isStartOut(TimeInterval times)
Checks if a particular time interval starts before this interval but ends during it. |
void |
setEnd(int eTime)
Set the end time of the interval. |
void |
setStart(int sTime)
Set the start time of the interval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeInterval(int sTime, int eTime)
sTime
- The start time for the interval.eTime
- The end time for the interval.Method Detail |
---|
public int getStart()
public int getEnd()
public java.lang.String getStartTimeString()
public java.lang.String getEndTimeString()
public void setStart(int sTime)
sTime
- The new start time.public void setEnd(int eTime)
eTime
- The new end time.public boolean isBefore(TimeInterval times)
times
- The time interval to be checked.
public boolean isAfter(TimeInterval times)
times
- The time interval to be checked.
public boolean isDuring(TimeInterval times)
times
- The time interval to be checked.
public boolean isStartOut(TimeInterval times)
times
- The time interval to be checked.
public boolean isEndOut(TimeInterval times)
times
- The time interval to be checked.
public int difference()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |