public class MInterval extends DataType implements java.io.Serializable
Constructor and Description |
---|
MInterval() |
MInterval(long milliSeconds)
Create an
MInterval by specifying the number of milliseconds. |
MInterval(java.lang.String iso8601Str)
Create an
MInterval from the specified string. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.lang.Object |
construct()
Facility for construting objects of this type
|
java.lang.Object |
construct(java.lang.String inputString) |
int |
getCategory() |
MClassDescription |
getClassDescription()
Return the interval class description
|
java.lang.String |
getISO8601String()
Return the interval as an ISO8601 String
|
long |
getMilliSeconds()
Return the whole interval as milliseconds.
|
int |
hashCode() |
MTree |
serialize() |
java.lang.String |
toString()
Return the interval as an ISO8601 string.
|
equals, getJavaClass, getName, isAssignable, isContainer, isScalar
public MInterval()
public MInterval(java.lang.String iso8601Str) throws MInvalidInputException
MInterval
from the specified string.iso8601Str
- A string indicating an interval. Use the following format:
PhDhhHmmMss[.s*]
, for example: P2DT3H2M
or PT3600S
MInvalidInputException
- If the string cannot be converted to milliseconds.public MInterval(long milliSeconds)
MInterval
by specifying the number of milliseconds.milliSeconds
- Milliseconds to encapsulate with this MInterval.public java.lang.String toString()
toString
in class java.lang.Object
public long getMilliSeconds()
public java.lang.String getISO8601String()
public MClassDescription getClassDescription()
public MTree serialize() throws MException
MException
- Always throw an exception because the sdk does not allow
serializing of this type as stand-alone object; an MInstance's attribute
can be declared to be of this typepublic java.lang.Object construct() throws MConstructionException
DataType
construct
in class DataType
MConstructionException
public java.lang.Object construct(java.lang.String inputString) throws MConstructionException
construct
in class DataType
MConstructionException
public int getCategory()
getCategory
in class DataType
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public int hashCode()
hashCode
in class java.lang.Object