javax.cim
public class CIMDateTimeInterval extends CIMDateTime
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(String pIntervalString)
Creates a CIMDateTimeInterval object using a string.
|
Method Summary | |
---|---|
int | compareTo(CIMDateTime pObj)
Compares the CIMDateTimeInterval object with this one. |
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.
|
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).
Parameters: 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).
Throws: IllegalArgumentException
CIMDateTimeInterval
using a milliseconds value.
Parameters: pMilliseconds Number of milliseconds in the interval (0 - 8639999999999999).
Throws: IllegalArgumentException
CIMDateTimeInterval
object using a string.
Parameters: pIntervalString A string in the format of ddddddddHHMMSS.mmmmmm:000.
Throws: IllegalArgumentException If string is not in the correct format.
CIMDateTimeInterval
object with this one. If
either interval has "Not Significant" fields then we only compare the
significant fields.
Parameters: pObj The CIMDateTimeInterval to be compared with this one.
Returns: -1, zero, or 1 as this interval is less than, equal to, or greater than the specified interval.
Throws: IllegalArgumentException
If the object passed in is not an instance of
CIMDataTimeInterval
.
Returns: If days field "not significant" this returns -1, otherwise returns number of days in the interval.
Returns: If hours field "not significant" this returns -1, otherwise returns number of hours in the interval.
Returns: If microseconds field "not significant" this returns -1, otherwise returns number of microseconds in the interval.
Returns: If minutes field "not significant" this returns -1, otherwise returns number of minutes in the interval.
Returns: If seconds field "not significant" this returns -1, otherwise returns number of seconds in the interval.
Returns: The length of the interval in milliseconds.