|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.gsfc.spdf.cdas.TimeInterval
public class TimeInterval
This class represents a time interval. That is, a continuous interval of time from a beginning time to an end time.
| Constructor Summary | |
|---|---|
TimeInterval()
Default constructor to satisfy JAX-RPC. |
|
TimeInterval(java.util.Date start,
java.util.Date end)
Constructs a TimeInterval from the given start and end time values. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
java.util.Date |
getEnd()
Provides the end Date of this time interval. |
long |
getIntervalMilliseconds()
Provides the number of milliseconds in this time interval. |
java.util.Date |
getStart()
Provides the start Date of this time interval. |
static void |
main(java.lang.String[] args)
Provides a method of testing this class. |
boolean |
overlaps(TimeInterval value)
Determines if the given TimeInterval overlaps in time with this TimeInterval. |
void |
setEnd(java.util.Date value)
Sets the end Date of this time interval. |
void |
setStart(java.util.Date value)
Sets the start Date of this time interval. |
java.lang.String |
toString()
Returns a String object representing this TimeInterval's value. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimeInterval()
public TimeInterval(java.util.Date start,
java.util.Date end)
start - beginning Date of time intervalend - ending Date of time interval| Method Detail |
|---|
public java.util.Date getStart()
setStart(java.util.Date)public void setStart(java.util.Date value)
value - start Date of time intervalgetStart()public java.util.Date getEnd()
setEnd(java.util.Date)public void setEnd(java.util.Date value)
value - end Date of time interval.getEnd()public long getIntervalMilliseconds()
public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException,
java.lang.UnsupportedOperationException
compareTo in interface java.lang.Comparableo - the Object to be compared.
java.lang.UnsupportedOperationException - if both the start time of this
interval and the start time of the given interval are
infinite (null).
java.lang.ClassCastException - if the specified object's type prevents
it from being compared to this Object.public java.lang.String toString()
toString in class java.lang.ObjectDate.toString()public boolean overlaps(TimeInterval value)
value - the TimeInterval to evaluate.
public java.lang.Object clone()
clone in class java.lang.Object
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - command-line arguments. Currently ignored.
java.lang.Exception - if any Exception occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||