|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
goodsjpi.Date
The class Date
is a wrapper for java.util.Date class which
prevents Date object from been modified. So value semantic can be used for this
class. It allows GOODS to store Date object as binary field without creating extra
persistent object in the storage.
Constructor Summary | |
Date()
Allocates a Date object and initializes it so that
it represents the time at which it was allocated, measured to the
nearest millisecond. |
|
Date(int year,
int month,
int date)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date)
or GregorianCalendar(year + 1900, month, date) . |
|
Date(int year,
int month,
int date,
int hrs,
int min)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date,
hrs, min) or GregorianCalendar(year + 1900,
month, date, hrs, min) . |
|
Date(int year,
int month,
int date,
int hrs,
int min,
int sec)
Deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date,
hrs, min, sec) or GregorianCalendar(year + 1900,
month, date, hrs, min, sec) . |
|
Date(long date)
Allocates a Date object and initializes it to
represent the specified number of milliseconds since the
standard base time known as "the epoch", namely January 1,
1970, 00:00:00 GMT. |
|
Date(java.lang.String s)
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s) . |
Method Summary | |
void |
setDate(int date)
|
void |
setHours(int hours)
|
void |
setMinutes(int minutes)
|
void |
setMonth(int month)
|
void |
setSeconds(int seconds)
|
void |
setTime(long time)
|
void |
setYear(int year)
|
Methods inherited from class java.util.Date |
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, toGMTString, toLocaleString, toString, UTC |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Date()
Date
object and initializes it so that
it represents the time at which it was allocated, measured to the
nearest millisecond.
System.currentTimeMillis()
public Date(long date)
Date
object and initializes it to
represent the specified number of milliseconds since the
standard base time known as "the epoch", namely January 1,
1970, 00:00:00 GMT.
date
- the milliseconds since January 1, 1970, 00:00:00 GMT.System.currentTimeMillis()
public Date(int year, int month, int date)
Calendar.set(year + 1900, month, date)
or GregorianCalendar(year + 1900, month, date)
.
Date
object and initializes it so that
it represents midnight, local time, at the beginning of the day
specified by the year
, month
, and
date
arguments.
year
- the year minus 1900.month
- the month between 0-11.date
- the day of the month between 1-31.Calendar
public Date(int year, int month, int date, int hrs, int min)
Calendar.set(year + 1900, month, date,
hrs, min)
or GregorianCalendar(year + 1900,
month, date, hrs, min)
.
Date
object and initializes it so that
it represents the instant at the start of the minute specified by
the year
, month
, date
,
hrs
, and min
arguments, in the local
time zone.
year
- the year minus 1900.month
- the month between 0-11.date
- the day of the month between 1-31.hrs
- the hours between 0-23.min
- the minutes between 0-59.Calendar
public Date(int year, int month, int date, int hrs, int min, int sec)
Calendar.set(year + 1900, month, date,
hrs, min, sec)
or GregorianCalendar(year + 1900,
month, date, hrs, min, sec)
.
Date
object and initializes it so that
it represents the instant at the start of the second specified
by the year
, month
, date
,
hrs
, min
, and sec
arguments,
in the local time zone.
year
- the year minus 1900.month
- the month between 0-11.date
- the day of the month between 1-31.hrs
- the hours between 0-23.min
- the minutes between 0-59.sec
- the seconds between 0-59.Calendar
public Date(java.lang.String s)
DateFormat.parse(String s)
.
Date
object and initializes it so that
it represents the date and time indicated by the string
s
, which is interpreted as if by the
Date.parse(java.lang.String)
method.
s
- a string representation of the date.Date.parse(java.lang.String)
Method Detail |
public void setYear(int year)
public void setMonth(int month)
public void setDate(int date)
public void setHours(int hours)
public void setMinutes(int minutes)
public void setSeconds(int seconds)
public void setTime(long time)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |