org.jfree.data.time
public class SimpleTimePeriod extends Object implements TimePeriod, Comparable, Serializable
java.util.Date
.
This class is intentionally immutable (that is, once constructed, you cannot alter the start and end attributes).
Constructor Summary | |
---|---|
SimpleTimePeriod(long start, long end)
Creates a new time allocation.
| |
SimpleTimePeriod(Date start, Date 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. |
Parameters: start the start date/time in milliseconds. end the end date/time in milliseconds.
Parameters: start the start date/time (null
not permitted). end the end date/time (null
not permitted).
Parameters: obj the object (null
not permitted).
Returns: An integer.
Throws: ClassCastException if obj
is not an instance of
TimePeriod.
Parameters: obj the other object (null
permitted).
Returns: A boolean.
Returns: The end date/time (never null
).
Returns: The end.
Since: 1.0.10.
Returns: The start date/time (never null
).
Returns: The start.
Since: 1.0.10.
http://developer.java.sun.com/
developer/Books/effectivejava/Chapter3.pdf
Returns: A hash code.