|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.axis.types.Duration
Implementation of the XML Schema type duration. Duration supports a minimum fractional second precision of milliseconds.
| Constructor Summary | |
Duration()
Default no-arg constructor |
|
Duration(boolean negative,
java.util.Calendar calendar)
Constructs Duration from a Calendar. |
|
Duration(boolean negative,
int aYears,
int aMonths,
int aDays,
int aHours,
int aMinutes,
double aSeconds)
|
|
Duration(java.lang.String duration)
Constructs Duration from a String in an xsd:duration format - PnYnMnDTnHnMnS. |
|
| Method Summary | |
boolean |
equals(java.lang.Object object)
The equals method compares the time represented by duration object, not its string representation. |
java.util.Calendar |
getAsCalendar()
Returns duration as a calendar. |
java.util.Calendar |
getAsCalendar(java.util.Calendar startTime)
Returns duration as a calendar. |
int |
getDays()
|
int |
getHours()
|
int |
getMinutes()
|
int |
getMonths()
|
double |
getSeconds()
|
int |
getYears()
|
int |
hashCode()
|
boolean |
isNegative()
|
void |
parseDate(java.lang.String date)
This method parses the date portion of a String that represents xsd:duration - nYnMnD. |
void |
parseTime(java.lang.String time)
This method parses the time portion of a String that represents xsd:duration - nHnMnS. |
void |
setDays(int days)
|
void |
setHours(int hours)
|
void |
setMinutes(int minutes)
|
void |
setMonths(int months)
|
void |
setNegative(boolean negative)
|
void |
setSeconds(double seconds)
Sets the seconds. |
void |
setSeconds(int seconds)
Deprecated. use setSeconds(double)
instead |
void |
setYears(int years)
|
java.lang.String |
toString()
This returns the xml representation of an xsd:duration object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Duration()
public Duration(boolean negative,
int aYears,
int aMonths,
int aDays,
int aHours,
int aMinutes,
double aSeconds)
negative - aYears - aMonths - aDays - aHours - aMinutes - aSeconds -
public Duration(java.lang.String duration)
throws java.lang.IllegalArgumentException
duration - String
SchemaException - if the string doesn't parse correctly.
java.lang.IllegalArgumentException
public Duration(boolean negative,
java.util.Calendar calendar)
throws java.lang.IllegalArgumentException
calendar - Calendar
java.lang.IllegalArgumentException - if the calendar object does not
represent any date nor time.| Method Detail |
public void parseTime(java.lang.String time)
throws java.lang.IllegalArgumentException
time -
java.lang.IllegalArgumentException - if time does not match pattern
public void parseDate(java.lang.String date)
throws java.lang.IllegalArgumentException
date -
java.lang.IllegalArgumentException - if date does not match patternpublic boolean isNegative()
public int getYears()
public int getMonths()
public int getDays()
public int getHours()
public int getMinutes()
public double getSeconds()
public void setNegative(boolean negative)
negative - public void setYears(int years)
years - public void setMonths(int months)
months - public void setDays(int days)
days - public void setHours(int hours)
hours - public void setMinutes(int minutes)
minutes - public void setSeconds(int seconds)
setSeconds(double)
instead
seconds - public void setSeconds(double seconds)
seconds - doublepublic java.lang.String toString()
public boolean equals(java.lang.Object object)
object - public int hashCode()
public java.util.Calendar getAsCalendar()
public java.util.Calendar getAsCalendar(java.util.Calendar startTime)
startTime - Calendar
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||