|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.data.TimePeriod
com.jrefinery.data.Second
public class Second
Represents a second in a particular day.
This class is immutable, which is a requirement for all TimePeriod subclasses.
| Field Summary | |
|---|---|
protected Minute |
minute
The day. |
protected int |
second
The second. |
| Fields inherited from class com.jrefinery.data.TimePeriod |
|---|
DEFAULT_TIME_ZONE, WORKING_CALENDAR |
| Fields inherited from interface com.jrefinery.date.MonthConstants |
|---|
APRIL, AUGUST, DECEMBER, FEBRUARY, JANUARY, JULY, JUNE, MARCH, MAY, NOVEMBER, OCTOBER, SEPTEMBER |
| Constructor Summary | |
|---|---|
Second()
Constructs a new Second, based on the system date/time. |
|
Second(java.util.Date time)
Constructs a second. |
|
Second(java.util.Date time,
java.util.TimeZone zone)
|
|
Second(int second,
Minute minute)
Constructs a new Second. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o1)
Returns an integer indicating the order of this Second object relative to the specified object: negative == before, zero == same, positive == after. |
boolean |
equals(java.lang.Object object)
Tests the equality of this object against an arbitrary Object. |
long |
getEnd(java.util.Calendar calendar)
Returns the last millisecond of the time period, evaluated using the supplied calendar (which incorporates a timezone). |
Minute |
getMinute()
Returns the minute. |
int |
getSecond()
Returns the second. |
long |
getStart(java.util.Calendar calendar)
Returns the first millisecond of the time period, evaluated using the supplied calendar (which incorporates a timezone). |
static void |
main(java.lang.String[] args)
Test code - please ignore. |
TimePeriod |
next()
Returns the second following this one. |
static Second |
parseSecond(java.lang.String s)
Creates a Minute instance by parsing a string. |
TimePeriod |
previous()
Returns the second preceding this one. |
| Methods inherited from class com.jrefinery.data.TimePeriod |
|---|
getEnd, getEnd, getMiddle, getMiddle, getMiddle, getStart, getStart |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Minute minute
protected int second
| Constructor Detail |
|---|
public Second()
public Second(int second,
Minute minute)
second - The second (0 to 24*60*60-1).day - The day.public Second(java.util.Date time)
time - The time.
public Second(java.util.Date time,
java.util.TimeZone zone)
| Method Detail |
|---|
public int getSecond()
public Minute getMinute()
public TimePeriod previous()
previous in class TimePeriodpublic TimePeriod next()
next in class TimePeriodpublic boolean equals(java.lang.Object object)
This method will return true ONLY if the object is a Second object representing the same second as this instance.
equals in class java.lang.Objectpublic int compareTo(java.lang.Object o1)
public long getStart(java.util.Calendar calendar)
TimePeriod
getStart in class TimePeriodcalendar - The calendar.
public long getEnd(java.util.Calendar calendar)
TimePeriod
getEnd in class TimePeriodcalendar - The calendar.
public static Second parseSecond(java.lang.String s)
public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||