Package javax.cim
Class CIMDateTime
- java.lang.Object
-
- javax.cim.CIMDateTime
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CIMDateTime>
- Direct Known Subclasses:
CIMDateTimeAbsolute
,CIMDateTimeInterval
public abstract class CIMDateTime extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CIMDateTime>
This abstract class represents a CIM Datetime data type as defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). It is in the format yyyyMMddHHmmss.SSSSSSsutc where:- yyyy - is a 4 digit year
- MM - is the month
- dd - is the day of the month
- HH - is the hour (24 hour clock)
- mm - is the minute
- ss - is the second
- SSSSSS - is the number of microseconds
- s - is "+" or "-", indicating the sign of the UTC (Universal Coordinated Time; for all intents and purposes the same as Greenwich Mean Time) correction field, or a ":". In the case of a ":" the value is interpreted as a time interval, and yyyyMM are interpreted as days.
- utc - is the offset from UTC in minutes (using the sign indicated by s). It is ignored for a time interval.
For example, the interval datetime for an elapsed time of 1 day, 13 hours, 23 minutes, 12 seconds would be: 00000001132312.000000:000. A UTC offset of zero is always used for interval properties.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CIMDateTime()
CIMDateTime(java.lang.String pDateString)
Creates aCIMDateTime
object using a string.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object pObj)
Determines whether theCIMDateTime
that is passed in is equal to the currentCIMDateTime
object.abstract java.lang.String
getDateTimeString()
Gets the internal string representation of this object.abstract int
hashCode()
Returns the hash code for this object.
-
-
-
Constructor Detail
-
CIMDateTime
public CIMDateTime(java.lang.String pDateString) throws java.lang.IllegalArgumentException
Creates aCIMDateTime
object using a string.- Parameters:
pDateString
- A string in the format of yyyyMMddHHmmss.SSSSSSsutc.- Throws:
java.lang.IllegalArgumentException
- If string is not in the correct format.
-
CIMDateTime
protected CIMDateTime()
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object pObj)
Determines whether theCIMDateTime
that is passed in is equal to the currentCIMDateTime
object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
pObj
- The CIMDateTime object to compare to.- Returns:
true
if this CIMDateTime object is equal to the one that was passed in, otherwisefalse
.
-
getDateTimeString
public abstract java.lang.String getDateTimeString()
Gets the internal string representation of this object.- Returns:
- The internal representation of the
CIMDateTime
object.
-
hashCode
public abstract int hashCode()
Returns the hash code for this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code value for this object.
- See Also:
Object.hashCode()
-
-