javax.cim
public class CIMDateTimeAbsolute extends CIMDateTime
CIMDateTimeAbsolute
class is modeled on the datetime data
type as specified in the CIM specification. It is in the format:
yyyyMMddHHmmss.SSSSSSsutc where
Constructor and Description |
---|
CIMDateTimeAbsolute()
Create a
CIMDateTimeAbsolute object using the current
Time/Date of the system. |
CIMDateTimeAbsolute(Calendar pCalendar)
Create a
CIMDateTimeAbsolute object using a
Calendar object. |
CIMDateTimeAbsolute(String pDateTime)
Creates a
CIMDateTimeAbsolute object using a string. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CIMDateTime pDateTime)
Compares the
CIMDateTimeAbsolute object with this one. |
String |
getDateTimeString()
Gets the internal string representation of the date/time object
|
int |
getDay()
Returns day value of this date.
|
int |
getHour()
Returns hour value of this date.
|
int |
getMicrosecond()
Returns microsecond value of this date.
|
int |
getMinute()
Returns minute value of this date.
|
int |
getMonth()
Returns month value of this date.
|
int |
getSecond()
Returns second value of this date.
|
int |
getUTCOffset()
Returns UTC offset value of this Date.
|
int |
getYear()
Returns year value of this Date.
|
int |
hashCode()
Returns the hashcode for this object.
|
String |
toString()
Returns a
String representation of the
CIMDateTimeAbsolute . |
equals
public CIMDateTimeAbsolute()
CIMDateTimeAbsolute
object using the current
Time/Date of the system.public CIMDateTimeAbsolute(Calendar pCalendar) throws IllegalArgumentException
CIMDateTimeAbsolute
object using a
Calendar
object.pCalendar
- - A Calendar
object used to initialize this
object.IllegalArgumentException
- - If pCalendar
is null
.public CIMDateTimeAbsolute(String pDateTime) throws IllegalArgumentException
CIMDateTimeAbsolute
object using a string.pDateTime
- - A string in the format of yyyyMMddHHmmss.SSSSSSsutcIllegalArgumentException
- - if string is not in the correct format.public int compareTo(CIMDateTime pDateTime) throws IllegalArgumentException
CIMDateTimeAbsolute
object with this one. If
either date has "Not Significant" fields then we can only compare the
significant fields.pDateTime
- - The CIMDateTimeAbsolute
to be compared with
this one.IllegalArgumentException
- If the object passed in is not an instance of
CIMDataTimeAbsolute
.public String getDateTimeString()
getDateTimeString
in class CIMDateTime
CIMDateTime.getDateTimeString()
public int getDay()
public int getHour()
public int getMicrosecond()
public int getMinute()
public int getMonth()
public int getSecond()
public int getUTCOffset()
public int getYear()
public int hashCode()
hashCode
in class CIMDateTime
Object.hashCode()
public String toString()
String
representation of the
CIMDateTimeAbsolute
. This method is intended to be used only
for debugging purposes, and the format of the returned string may vary
between implementations. The returned string may be empty but may not be
null
.toString
in class Object
Object.toString()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.