javax.cim
Class CIMDateTime

java.lang.Object
  extended byjavax.cim.CIMDateTime
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
CIMDateTimeAbsolute, CIMDateTimeInterval

public abstract class CIMDateTime
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

This abstract class repesents 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 mmmmmm - is the number of microseconds s - is "+" or "-", indicating the sign of the UTC (Universal Coordinated Time; for all intents and purposes the sane as Greenwhich Mean Time) correction field, or a ":". In the case of a ":" the value is interpreted as a time interval, and yyyyMM are interreted 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 Monday, May 25, 1998, at 1:30 PM EST would be represented as: 19980525133015.000000-300 Values must be zero-padded so that the entire string is always the same 25-character length. Fields which are not significant must be replaced with asterisk characters. Similarly, intervals use the same format, except that the interpretation of the fileds is based on elapsed time. For example, 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.

Since:
JSR 1.0.0
See Also:
Serialized Form

Constructor Summary
CIMDateTime(java.lang.String dateString)
          Creates a CIMDateTimeAbsolute object using a string
 
Method Summary
 boolean equals(CIMDateTime pDateTime)
          Determines whether the CIMDateTime that is passed in is eqaul to the current CIMDateTime object
abstract  java.lang.String getDateTimeString()
          Gets the internal string representation of this object
abstract  int hashCode()
          returns the hascode for this object
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CIMDateTime

public CIMDateTime(java.lang.String dateString)
            throws java.lang.IllegalArgumentException
Creates a CIMDateTimeAbsolute object using a string

Parameters:
dateString - A string in the format of yyyyMMddHHmmss.SSSSSSsutc
Throws:
java.lang.IllegalArgumentException - if string is not in the correct format
Method Detail

equals

public boolean equals(CIMDateTime pDateTime)
Determines whether the CIMDateTime that is passed in is eqaul to the current CIMDateTime object

Parameters:
pDateTime - The CIMDateTime object to compare to
Returns:
True if this CIMDateTime object is equal to the one that was passed in, otherwise false

getDateTimeString

public abstract java.lang.String getDateTimeString()
Gets the internal string representation of this object

Returns:
String the internal representation of the CIMDateTime object

hashCode

public abstract int hashCode()
returns the hascode for this object

Returns:
a hashcode value for this object


Java™ WBEM (JSR48) 1.0.0 API