|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Calendar java.util.GregorianCalendar de.bea.domingo.util.GregorianTime
public final class GregorianTime
A time-only Gregorian calendar. Milliseconds are always zero,
Field Summary |
---|
Fields inherited from class java.util.GregorianCalendar |
---|
AD, BC |
Fields inherited from class java.util.Calendar |
---|
AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
Constructor Summary | |
---|---|
GregorianTime()
Default Constructor. |
|
GregorianTime(java.util.Calendar calendar)
Creates a new Gregorian date from a given java.util.Calendar . |
|
GregorianTime(java.util.Date date)
Creates a new Gregorian date from a given java.util.Date . |
|
GregorianTime(int hour,
int minute,
int second)
Creates a new Gregorian date from given year, month and date. |
Method Summary | |
---|---|
void |
add(int field,
int amount)
Overwrite to prevent setting date fields. |
protected void |
computeFields()
Overwrites GregorianCalendar.computeFields(), to disable all date fields. |
protected void |
computeTime()
Overwrites GregorianCalendar.computeTime(), to disable all date fields. |
int |
getHour()
Returns the hour of the calendar. |
int |
getMinute()
Returns the minute of the calendar. |
int |
getSecond()
Returns the second of the calendar. |
void |
set(int field,
int value)
Overwrite prevents setting date fields. |
void |
setTimeInMillis(long millis)
Overwrites Calendar.setTimeInMillis(long) , to disable all date fields. |
void |
setTimeZone(java.util.TimeZone zone)
Overwrite prevents setting a time zone to keep the time unchanged and the date unavailable. |
java.lang.String |
toString()
|
Methods inherited from class java.util.GregorianCalendar |
---|
clone, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, hashCode, isLeapYear, roll, roll, setGregorianChange |
Methods inherited from class java.util.Calendar |
---|
after, before, clear, clear, compareTo, complete, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GregorianTime()
public GregorianTime(java.util.Date date)
java.util.Date
.
date
- the date for the new calendarpublic GregorianTime(java.util.Calendar calendar)
java.util.Calendar
.
calendar
- the original calendar for the new calendarpublic GregorianTime(int hour, int minute, int second)
The first month of the year is JANUARY
which is 0; the
last month is DEDCEMBER
which is 11.
hour
- the hour of the new calendarminute
- the minute of the new calendarsecond
- the second of the new calendarMethod Detail |
---|
public void set(int field, int value)
set
in class java.util.Calendar
field
- the given calendar field.value
- the value to be set for the given calendar field.Calendar.set(int, int)
public void add(int field, int amount)
add
in class java.util.GregorianCalendar
field
- the time field.amount
- the amount of date or time to be added to the field.GregorianCalendar.add(int, int)
public void setTimeZone(java.util.TimeZone zone)
setTimeZone
in class java.util.GregorianCalendar
zone
- the new time zone (ignored)Calendar.setTimeZone(java.util.TimeZone)
public void setTimeInMillis(long millis)
Calendar.setTimeInMillis(long)
, to disable all date fields.
setTimeInMillis
in class java.util.Calendar
millis
- the new time in UTC milliseconds from the epoch.Calendar.setTimeInMillis(long)
protected void computeFields()
computeFields
in class java.util.GregorianCalendar
Calendar.computeTime()
protected void computeTime()
computeTime
in class java.util.GregorianCalendar
Calendar.computeTime()
public int getHour()
public int getMinute()
public int getSecond()
public java.lang.String toString()
toString
in class java.util.Calendar
Calendar.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |