|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.opencloud.slee.resources.mm7.MM7Duration
public class MM7Duration
Mapping of the XML Schema "duration" type, as used in MM7. The precision of a duration type is theoretically unlimited, but this type limits the smallest unit to milliseconds and allows at most Integer.MAX_VALUE of each unit. MM7Duration instances are immutable.
Constructor Summary | |
---|---|
MM7Duration(int years,
int months,
int days,
int hours,
int minutes,
int seconds,
int milliseconds,
boolean negative)
Construct a new MM7Duration object |
Method Summary | |
---|---|
void |
addTo(java.util.Calendar cal)
Add this duration to an existing Calendar object. |
boolean |
equals(java.lang.Object o)
|
int |
getDays()
|
int |
getHours()
|
int |
getMilliseconds()
|
int |
getMinutes()
|
int |
getMonths()
|
int |
getSeconds()
|
int |
getYears()
|
int |
hashCode()
|
boolean |
isNegative()
|
java.lang.String |
toString()
Returns a string representation of a duration value, as specified by XML Schema (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MM7Duration(int years, int months, int days, int hours, int minutes, int seconds, int milliseconds, boolean negative)
years
- the number of years (>=0) in the durationmonths
- the number of months (>=0) in the durationdays
- the number of days (>=0) in the durationhours
- the number of hours (>=0) in the durationminutes
- the number of minutes (>=0) in the durationseconds
- the number of seconds (>=0) in the durationmilliseconds
- the number of milliseconds (>=0) in the durationnegative
- true if this duration indicates a negative duration
java.lang.IllegalArgumentException
- if any parameter is negativeMethod Detail |
---|
public int getYears()
public int getMonths()
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public int getMilliseconds()
public boolean isNegative()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void addTo(java.util.Calendar cal)
cal
- the calendar to update
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |