javax.cim
Class CIMDateTime

java.lang.Object
  extended by javax.cim.CIMDateTime
All Implemented Interfaces:
Serializable, Comparable<CIMDateTime>
Direct Known Subclasses:
CIMDateTimeAbsolute, CIMDateTimeInterval

public abstract class CIMDateTime
extends Object
implements Serializable, 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:

For example, the absolute datetime for 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 fields is based on elapsed time.
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
protected CIMDateTime()
           
  CIMDateTime(String pDateString)
          Creates a CIMDateTime object using a string.
 
Method Summary
 boolean equals(Object pObj)
          Determines whether the CIMDateTime that is passed in is equal to the current CIMDateTime object.
abstract  String getDateTimeString()
          Gets the internal string representation of this object.
abstract  int hashCode()
          Returns the hash code for this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CIMDateTime

public CIMDateTime(String pDateString)
            throws IllegalArgumentException
Creates a CIMDateTime object using a string.

Parameters:
pDateString - A string in the format of yyyyMMddHHmmss.SSSSSSsutc.
Throws:
IllegalArgumentException - If string is not in the correct format.

CIMDateTime

protected CIMDateTime()
Method Detail

equals

public boolean equals(Object pObj)
Determines whether the CIMDateTime that is passed in is equal to the current CIMDateTime object.

Overrides:
equals in class Object
Parameters:
pObj - 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 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 class Object
Returns:
A hash code value for this object.
See Also:
Object.hashCode()


Copyright © 2005, 2013 IBM Corporation. All Rights Reserved.