|
||||||||
| 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.Millisecond
public class Millisecond
Represents a millisecond.
This class is immutable, which is a requirement for all TimePeriod subclasses.
| Field Summary | |
|---|---|
static int |
FIRST_MILLISECOND_IN_SECOND
|
static int |
LAST_MILLISECOND_IN_SECOND
|
protected int |
millisecond
The millisecond. |
protected Second |
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 | |
|---|---|
Millisecond()
Constructs a millisecond based on the current system time. |
|
Millisecond(java.util.Date time)
Constructs a millisecond. |
|
Millisecond(java.util.Date time,
java.util.TimeZone zone)
|
|
Millisecond(int millisecond,
Second second)
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. |
boolean |
equals(java.lang.Object object)
Tests the equality of this object against an arbitrary Object. |
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 |
getMillisecond()
Returns the millisecond. |
Second |
getSecond()
|
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). |
static void |
main(java.lang.String[] args)
Test code - please ignore. |
TimePeriod |
next()
Returns the millisecond following this one. |
TimePeriod |
previous()
Returns the millisecond preceding this one. |
java.lang.String |
toString()
|
| Methods inherited from class com.jrefinery.data.TimePeriod |
|---|
getEnd, getMiddle, getMiddle, getMiddle, getStart |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FIRST_MILLISECOND_IN_SECOND
public static final int LAST_MILLISECOND_IN_SECOND
protected int millisecond
protected Second second
| Constructor Detail |
|---|
public Millisecond()
public Millisecond(int millisecond,
Second second)
millisecond - The millisecond (same encoding as java.util.Date).public Millisecond(java.util.Date time)
time - The time.
public Millisecond(java.util.Date time,
java.util.TimeZone zone)
| Method Detail |
|---|
public Second getSecond()
public long getMillisecond()
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 Millisecond object representing the same millisecond as this instance.
equals in class java.lang.Objectpublic 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 java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||