|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.biocomfort.TO.DateTimeTO
public class DateTimeTO
The DateTimeTO
is a data class to store the date time
information of a medical device. It is part of the class
MedicalDeviceTO
but initially not instantiated. To store the date
time information for a medical device create a new instance of this class
and assign it to the MedicalDeviceTO
object.
This class also include some helper methods to manipulate the date time
for the default time zone and local.
MedicalDeviceTO.setDateTime(DateTimeTO)
,
MedicalDeviceTO.getDateTime()
,
Serialized FormConstructor Summary | |
---|---|
DateTimeTO()
Constructs a DateTimeTO object with initializing it so
that it represents the time at which it was allocated, measured to the
nearest millisecond. |
|
DateTimeTO(java.util.Date dateTime)
Constructs a DateTimeTO object with specifying the date
and time by the given Date object. |
|
DateTimeTO(int year,
int month,
int day,
int hourOfDay,
int minute,
int second)
Constructs a DateTimeTO object with initializing it so
that it represents the instant at the start of the second specified by
the year, month, day, hourOfDay, minute, and second arguments, for the
default time zone and local. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a deep clone of this DateTimeTO object. |
java.util.Date |
getDateTime()
Returns a Date object representing the time value of
this data object. |
int |
getDay()
Returns the day of the month represented by this DateTimeTO
object. |
int |
getHourOfDay()
Returns the hour of day represented by this DateTimeTO
object. |
int |
getMinute()
Returns the number of minutes past the hour represented by this date time object, as interpreted in the local time zone. |
int |
getMonth()
Returns a number representing the month that contains or begins with the instant in time represented by this DateTimeTO object,
as interpreted for the default time zone and local. |
int |
getSecond()
Returns the number of seconds past the minute represented by this date time object. |
int |
getYear()
Returns a number representing the year that contains or begins with the instant in time represented by this DateTimeTO object,
as interpreted for the default time zone and local. |
void |
setDateTime(java.util.Date dateTime)
Sets this DateTimeTO 's date and time to the given
Date . |
void |
setDateTime(int year,
int month,
int day,
int hourOfDay,
int minute,
int second)
Sets the date and time so that it represents the instant at the start of the second specified by the year, month, day, hourOfDay, minute, and second arguments, for the default time zone and local. |
java.lang.String |
toString()
Converts this DateTimeTO object to a String
of the form:
DateTimeTO (dateTime: dow mon dd hh:mm:ss zzz yyyy)
See java.util.Date.toString() for more details. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DateTimeTO()
DateTimeTO
object with initializing it so
that it represents the time at which it was allocated, measured to the
nearest millisecond.
public DateTimeTO(java.util.Date dateTime)
DateTimeTO
object with specifying the date
and time by the given Date
object.
dateTime
- the date timepublic DateTimeTO(int year, int month, int day, int hourOfDay, int minute, int second)
DateTimeTO
object with initializing it so
that it represents the instant at the start of the second specified by
the year, month, day, hourOfDay, minute, and second arguments, for the
default time zone and local.
year
- the yearmonth
- the month between 1-12day
- the day of month between 1-31hourOfDay
- the hour of a day between 0-23minute
- the minutes between 0-59second
- the seconds between 0-59Method Detail |
---|
public java.util.Date getDateTime()
Date
object representing the time value of
this data object.
Date
representing the time valuepublic void setDateTime(java.util.Date dateTime)
DateTimeTO
's date and time to the given
Date
.
dateTime
- the given Date
public void setDateTime(int year, int month, int day, int hourOfDay, int minute, int second)
year
- the yearmonth
- the month between 1-12day
- the day of month between 1-31hourOfDay
- the hour of a day between 0-23minute
- the minutes between 0-59second
- the seconds between 0-59public int getYear()
DateTimeTO
object,
as interpreted for the default time zone and local.
public int getMonth()
DateTimeTO
object,
as interpreted for the default time zone and local. The value returned
is between 1 and 12, with the value 1 representing January.
public int getDay()
DateTimeTO
object. The value returned is between 1 and 31 representing the
day of the month that contains or begins with the instant in time
represented by this date time object, as interpreted in the local time
zone.
public int getHourOfDay()
DateTimeTO
object. The returned value is a number (0 through 23) representing the
hour within the day that contains or begins with the instant in time
represented by this DateTimeTO
object, as interpreted in
the local time zone.
public int getMinute()
public int getSecond()
public java.lang.String toString()
DateTimeTO
object to a String
of the form:
SeeDateTimeTO (dateTime: dow mon dd hh:mm:ss zzz yyyy)
java.util.Date.toString()
for more details.
toString
in class java.lang.Object
Date.toString()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
DateTimeTO
object.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |