java.lang.Object | ||
↳ | org.jfree.data.time.RegularTimePeriod | |
↳ | org.jfree.data.time.Millisecond |
Represents a millisecond. This class is immutable, which is a requirement
for all RegularTimePeriod
subclasses.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FIRST_MILLISECOND_IN_SECOND | A constant for the first millisecond in a second. | |||||||||
int | LAST_MILLISECOND_IN_SECOND | A constant for the last millisecond in a second. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a millisecond based on the current system time.
| |||||||||||
Constructs a millisecond.
| |||||||||||
Creates a new millisecond.
| |||||||||||
Constructs a new millisecond using the default time zone.
| |||||||||||
This constructor is deprecated.
As of 1.0.13, use the constructor that specifies the locale
also.
| |||||||||||
Creates a millisecond.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an integer indicating the order of this Millisecond object
relative to the specified object:
negative == before, zero == same, positive == after.
| |||||||||||
Tests the equality of this object against an arbitrary Object.
| |||||||||||
Returns the first millisecond of the time period.
| |||||||||||
Returns the first millisecond of the second.
| |||||||||||
Returns the last millisecond of the time period.
| |||||||||||
Returns the last millisecond of the second.
| |||||||||||
Returns the millisecond.
| |||||||||||
Returns the second.
| |||||||||||
Returns a serial index number for the millisecond.
| |||||||||||
Returns a hash code for this object instance.
| |||||||||||
Returns the millisecond following this one.
| |||||||||||
Recalculates the start date/time and end date/time for this time period
relative to the supplied calendar (which incorporates a time zone).
| |||||||||||
Returns the millisecond preceding this one.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
A constant for the first millisecond in a second.
A constant for the last millisecond in a second.
Constructs a millisecond based on the current system time.
Constructs a millisecond.
millisecond | the millisecond (0-999). |
---|---|
second | the second. |
Creates a new millisecond.
millisecond | the millisecond (0-999). |
---|---|
second | the second (0-59). |
minute | the minute (0-59). |
hour | the hour (0-23). |
day | the day (1-31). |
month | the month (1-12). |
year | the year (1900-9999). |
Constructs a new millisecond using the default time zone.
time | the time. |
---|
This constructor is deprecated.
As of 1.0.13, use the constructor that specifies the locale
also.
Creates a millisecond.
time | the instant in time. |
---|---|
zone | the time zone. |
Creates a millisecond.
time | the date-time (null not permitted). |
---|---|
zone | the time zone (null not permitted). |
locale | the locale (null not permitted). |
Returns an integer indicating the order of this Millisecond object relative to the specified object: negative == before, zero == same, positive == after.
obj | the object to compare |
---|
Tests the equality of this object against an arbitrary Object.
This method will return true ONLY if the object is a Millisecond object representing the same millisecond as this instance.
obj | the object to compare |
---|
true
if milliseconds and seconds of this and object
are the same.
Returns the first millisecond of the time period.
calendar | the calendar (null not permitted). |
---|
NullPointerException | if calendar is
null .
|
---|
Returns the first millisecond of the second. This will be determined
relative to the time zone specified in the constructor, or in the
calendar instance passed in the most recent call to the
peg(Calendar)
method.
Returns the last millisecond of the time period.
calendar | the calendar (null not permitted). |
---|
NullPointerException | if calendar is
null .
|
---|
Returns the last millisecond of the second. This will be
determined relative to the time zone specified in the constructor, or
in the calendar instance passed in the most recent call to the
peg(Calendar)
method.
Returns the millisecond.
Returns a serial index number for the millisecond.
Returns a hash code for this object instance. The approach described by Joshua Bloch in "Effective Java" has been used here:
http://developer.java.sun.com/developer/Books/effectivejava
/Chapter3.pdf
Returns the millisecond following this one.
Recalculates the start date/time and end date/time for this time period relative to the supplied calendar (which incorporates a time zone).
calendar | the calendar (null not permitted). |
---|
Returns the millisecond preceding this one.