|
||||||||
| 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.FixedMillisecond
public class FixedMillisecond
Wrapper for a java.util.Date object that allows it to be used as a TimePeriod.
This class is immutable, which is a requirement for all TimePeriod subclasses.
| Field Summary | |
|---|---|
protected java.util.Date |
time
The millisecond. |
| 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 | |
|---|---|
FixedMillisecond()
Constructs a millisecond based on the current system time. |
|
FixedMillisecond(java.util.Date time)
Constructs a millisecond. |
|
FixedMillisecond(long millisecond)
Constructs a millisecond. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o1)
Returns an integer indicating the order of this Millisecond object relative to the specified object: negative == before, zero == same, positive == after. |
long |
getEnd()
Returns the last millisecond of the time period. |
long |
getEnd(java.util.Calendar calendar)
Returns the last millisecond of the time period, evaluated using the supplied calendar (which incorporates a timezone). |
long |
getMiddle()
Returns the millisecond closest to the middle of the time period. |
long |
getMiddle(java.util.Calendar calendar)
Returns the millisecond closest to the middle of the time period, evaluated using the supplied calendar (which incorporates a timezone). |
long |
getStart()
Returns the first millisecond of the time period. |
long |
getStart(java.util.Calendar calendar)
Returns the first millisecond of the time period, evaluated using the supplied calendar (which incorporates a timezone). |
java.util.Date |
getTime()
Returns the date/time. |
TimePeriod |
next()
Returns the millisecond following this one. |
TimePeriod |
previous()
Returns the millisecond preceding this one. |
| Methods inherited from class com.jrefinery.data.TimePeriod |
|---|
getEnd, getMiddle, getStart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Date time
| Constructor Detail |
|---|
public FixedMillisecond()
public FixedMillisecond(long millisecond)
millisecond - The millisecond (same encoding as java.util.Date).public FixedMillisecond(java.util.Date time)
time - The time.| Method Detail |
|---|
public java.util.Date getTime()
public TimePeriod previous()
previous in class TimePeriodpublic TimePeriod next()
next in class TimePeriodpublic int compareTo(java.lang.Object o1)
public long getStart()
getStart in class TimePeriodpublic long getStart(java.util.Calendar calendar)
TimePeriod
getStart in class TimePeriodcalendar - The calendar.
public long getEnd()
getEnd in class TimePeriodpublic long getEnd(java.util.Calendar calendar)
TimePeriod
getEnd in class TimePeriodcalendar - The calendar.
public long getMiddle()
getMiddle in class TimePeriodpublic long getMiddle(java.util.Calendar calendar)
TimePeriod
getMiddle in class TimePeriodcalendar - The calendare.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||