|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.cim.CIMDateTime javax.cim.CIMDateTimeInterval
This class represents the datetime data type when used as a time value as specified in the CIM Infrastructure specification. It is in the format: ddddddddHHMMSS.mmmmmm:000 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. fields that are not significant MUST be replaced with asterisk ("*") characters. Not significant fields are those that are beyond the resolution of the data source. This is used to indicate the precision of the value and can only be done for an adjacent set of fields, starting with the least significant field (mmmmmm), and continuing to more significant fields. The granularity of using asterisks is always the entire field, except for the mmmmmm field where the granularity is single digits. The UTC offset field MUST NOT contain asterisks. For example, if an interval of 1 day, 13 hours, 23 minutes, 12 seconds, and 125 milliseconds was measured with a precision of 1 millisecond, the format would be: 00000001132312.125***:000.
Constructor Summary | |
CIMDateTimeInterval(int pDays,
int pHours,
int pMinutes,
int pSeconds,
int pMicroseconds)
Constructs a CIMDateTimeInterval using the individual values of the interval (day, hours, minutes, seconds and microseconds). |
|
CIMDateTimeInterval(long pMilliseconds)
Constructs a CIMDateTimeInterval using a milliseconds value Note: |
|
CIMDateTimeInterval(java.lang.String pIntervalString)
Creates a CIMDateTimeInterval object using a string |
Method Summary | |
int |
compareTo(java.lang.Object dt)
Compares the CIMDateTimeInterval object with this one. |
java.lang.String |
getDateTimeString()
Gets the internal string representation of this object |
int |
getDays()
Returns days value of this interval |
int |
getHours()
Returns hours value of this interval |
int |
getMicroseconds()
Returns microseconds value of this interval |
int |
getMinutes()
Returns minutes value of this interval |
int |
getSeconds()
Returns seconds value of this interval |
long |
getTotalMilliseconds()
Returns the total length of the interval in milliseconds |
int |
hashCode()
returns the hascode for this object |
java.lang.String |
toString()
Returns a String representation of the CIMDateTimeInterval. |
Methods inherited from class javax.cim.CIMDateTime |
equals |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CIMDateTimeInterval(int pDays, int pHours, int pMinutes, int pSeconds, int pMicroseconds) throws java.lang.IllegalArgumentException
pDays
- number of days in the interval (-1 - 99999999)pHours
- number of hours in the interval (-1 - 24)pMinutes
- number of minutes in the interval (-1 - 60)pSeconds
- number of seconds in the interval (-1 - 60)pMicroseconds
- number of microseconds in the interval (-1 - 999999)public CIMDateTimeInterval(long pMilliseconds) throws java.lang.IllegalArgumentException
pMilliseconds
- number of milliseconds in the interval (0 - 999999)public CIMDateTimeInterval(java.lang.String pIntervalString) throws java.lang.IllegalArgumentException
pIntervalString
- A string in the format of ddddddddHHMMSS.mmmmmm:000
java.lang.IllegalArgumentException
- if string is not in the correct formatMethod Detail |
public int compareTo(java.lang.Object dt)
compareTo
in interface java.lang.Comparable
dt
- The CIMDateTimeAbsolute to be compared with this one
java.lang.IllegalArgumentException
- if the object passed in is not an instance of
CIMDataTimeIntervalpublic java.lang.String getDateTimeString()
getDateTimeString
in class CIMDateTime
public int getDays()
public int getHours()
public int getMicroseconds()
public int getMinutes()
public int getSeconds()
public long getTotalMilliseconds()
public int hashCode()
hashCode
in class CIMDateTime
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |