java.lang.Object | ||
↳ | org.jfree.data.time.RegularTimePeriod | |
↳ | org.jfree.data.time.Second |
Represents a second in a particular day. This class is immutable, which is
a requirement for all RegularTimePeriod
subclasses.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FIRST_SECOND_IN_MINUTE | Useful constant for the first second in a minute. | |||||||||
int | LAST_SECOND_IN_MINUTE | Useful constant for the last second in a minute. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Second, based on the system date/time.
| |||||||||||
Constructs a new Second.
| |||||||||||
Creates a new second.
| |||||||||||
Constructs a new instance from the specified date/time and the default
time zone..
| |||||||||||
This constructor is deprecated.
As of 1.0.13, use the constructor that specifies the locale
also.
| |||||||||||
Creates a new second based on the supplied time and time zone.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns an integer indicating the order of this Second 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 minute.
| |||||||||||
Returns the first millisecond of the second.
| |||||||||||
Returns the last millisecond of the second.
| |||||||||||
Returns the last millisecond of the second.
| |||||||||||
Returns the minute.
| |||||||||||
Returns the second within the minute.
| |||||||||||
Returns a serial index number for the minute.
| |||||||||||
Returns a hash code for this object instance.
| |||||||||||
Returns the second following this one.
| |||||||||||
Creates a new instance by parsing a string.
| |||||||||||
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 second preceding this one.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Useful constant for the first second in a minute.
Useful constant for the last second in a minute.
Constructs a new Second, based on the system date/time.
Constructs a new Second.
second | the second (0 to 24*60*60-1). |
---|---|
minute | the minute (null not permitted).
|
Creates a new second.
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 instance from the specified date/time and the default time zone..
time | the time (null not permitted). |
---|
This constructor is deprecated.
As of 1.0.13, use the constructor that specifies the locale
also.
Creates a new second based on the supplied time and time zone.
time | the instant in time. |
---|---|
zone | the time zone. |
Creates a new second based on the supplied time and time zone.
time | the 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 Second object relative to the specified object: negative == before, zero == same, positive == after.
o1 | 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 Second object representing the same second as this instance.
obj | the object to compare (null permitted). |
---|
true
if second and minute of this and the object
are the same.
Returns the first millisecond of the minute.
calendar | the calendar/timezone (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 second.
calendar | the calendar/timezone (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 second within the minute.
Returns a serial index number for the minute.
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 second following this one.
Creates a new instance by parsing a string. The string is assumed to be in the format "YYYY-MM-DD HH:MM:SS", perhaps with leading or trailing whitespace.
s | the string to parse. |
---|
null
if the string is not parseable.
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 second preceding this one.