|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.cim.CIMDateTime
javax.cim.CIMDateTimeInterval
public class CIMDateTimeInterval
This class represents the datetime data type when used as a time value as specified by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004). It is in the format ddddddddHHMMSS.mmmmmm:000 where:
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. |
|
CIMDateTimeInterval(java.lang.String pIntervalString)
Creates a CIMDateTimeInterval object using a string. |
Method Summary | |
---|---|
int |
compareTo(CIMDateTime pObj)
Compares the CIMDateTimeInterval object with this one. |
boolean |
equals(java.lang.Object pObj)
Determines whether the CIMDateTimeInterval that is passed in
is equal to the current CIMDateTimeInterval object. |
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 hash code for this object. |
java.lang.String |
toString()
Returns a String representation of the
CIMDateTimeInterval . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CIMDateTimeInterval(int pDays, int pHours, int pMinutes, int pSeconds, int pMicroseconds) throws java.lang.IllegalArgumentException
CIMDateTimeInterval
using the individual values
of the interval (day, hours, minutes, seconds and microseconds). Any
property that has a -1 will make that field "not significant" (i.e. that
field has asterisks in the datetime string).
pDays
- Number of days in the interval (-1 - 99999999).pHours
- Number of hours in the interval (-1 - 23).pMinutes
- Number of minutes in the interval (-1 - 59).pSeconds
- Number of seconds in the interval (-1 - 59).pMicroseconds
- Number of microseconds in the interval (-1 - 999999).
java.lang.IllegalArgumentException
public CIMDateTimeInterval(long pMilliseconds) throws java.lang.IllegalArgumentException
CIMDateTimeInterval
using a milliseconds value.
pMilliseconds
- Number of milliseconds in the interval (0 - 8639999999999999).
java.lang.IllegalArgumentException
public CIMDateTimeInterval(java.lang.String pIntervalString) throws java.lang.IllegalArgumentException
CIMDateTimeInterval
object using a string.
pIntervalString
- A string in the format of ddddddddHHMMSS.mmmmmm:000.
java.lang.IllegalArgumentException
- If string is not in the correct format.Method Detail |
---|
public int compareTo(CIMDateTime pObj) throws java.lang.IllegalArgumentException
CIMDateTimeInterval
object with this one. If
either interval has "Not Significant" fields then we only compare the
significant fields.
pObj
- The CIMDateTimeInterval to be compared with this
one.
java.lang.IllegalArgumentException
- If the object passed in is not an instance of
CIMDataTimeInterval
.public boolean equals(java.lang.Object pObj)
CIMDateTimeInterval
that is passed in
is equal to the current CIMDateTimeInterval
object.
equals
in class CIMDateTime
pObj
- The CIMDateTimeInterval
object to compare to.
true
if this CIMDateTimeInterval
object
is equal to the one that was passed in, otherwise
false
.public java.lang.String getDateTimeString()
getDateTimeString
in class CIMDateTime
CIMDateTimeInterval
object.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
Object.hashCode()
public java.lang.String toString()
String
representation of the
CIMDateTimeInterval
. 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 java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |