|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.time.SimpleTimePeriod
public class SimpleTimePeriod
An arbitrary period of time, measured to millisecond precision using
java.util.Date
.
This class is intentionally immutable (that is, once constructed, you cannot alter the start and end attributes).
Constructor Summary | |
---|---|
SimpleTimePeriod(Date start,
Date end)
Creates a new time allocation. |
|
SimpleTimePeriod(long start,
long end)
Creates a new time allocation. |
Method Summary | |
---|---|
int |
compareTo(Object obj)
Returns an integer that indicates the relative ordering of two time periods. |
boolean |
equals(Object obj)
Tests this time period instance for equality with an arbitrary object. |
Date |
getEnd()
Returns the end date/time. |
long |
getEndMillis()
Returns the end date/time in milliseconds. |
Date |
getStart()
Returns the start date/time. |
long |
getStartMillis()
Returns the start date/time in milliseconds. |
int |
hashCode()
Returns a hash code for this object instance. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleTimePeriod(long start, long end)
start
- the start date/time in milliseconds.end
- the end date/time in milliseconds.public SimpleTimePeriod(Date start, Date end)
start
- the start date/time (null
not permitted).end
- the end date/time (null
not permitted).Method Detail |
---|
public Date getStart()
getStart
in interface TimePeriod
null
).public long getStartMillis()
public Date getEnd()
getEnd
in interface TimePeriod
null
).public long getEndMillis()
public boolean equals(Object obj)
TimePeriod
and it has the same start and end dates.
equals
in class Object
obj
- the other object (null
permitted).
public int compareTo(Object obj)
compareTo
in interface Comparable
obj
- the object (null
not permitted).
ClassCastException
- if obj
is not an instance of
TimePeriod
.public int hashCode()
http://developer.java.sun.com/
developer/Books/effectivejava/Chapter3.pdf
hashCode
in class Object
|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |