com.opencloud.slee.resources.mm7
Class MM7RelativeOrAbsoluteDate

java.lang.Object
  extended by com.opencloud.slee.resources.mm7.MM7RelativeOrAbsoluteDate
Direct Known Subclasses:
UserAgentRelativeOrAbsoluteDate

public class MM7RelativeOrAbsoluteDate
extends java.lang.Object

Mapping of the MM7 relativeOrAbsoluteDateType type, which is a union of dateTime and duration. That is, it is either an absolute time, or a relative duration).


Constructor Summary
MM7RelativeOrAbsoluteDate(java.util.Date date)
          Create a new absolute timestamp
MM7RelativeOrAbsoluteDate(MM7Duration duration)
          Create a new relative timestamp
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Date getAbsoluteDate()
          Get the absolute date part of this value, if present.
 MM7Duration getDuration()
          Get the relative duration part of this value, if present.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MM7RelativeOrAbsoluteDate

public MM7RelativeOrAbsoluteDate(java.util.Date date)
Create a new absolute timestamp

Parameters:
date - the absolute date

MM7RelativeOrAbsoluteDate

public MM7RelativeOrAbsoluteDate(MM7Duration duration)
Create a new relative timestamp

Parameters:
duration - the relative duration
Method Detail

getAbsoluteDate

public java.util.Date getAbsoluteDate()
Get the absolute date part of this value, if present.

Returns:
an absolute date/time, or null if not present

getDuration

public MM7Duration getDuration()
Get the relative duration part of this value, if present.

Returns:
a duration, or null if not present

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object