| java.lang.Object org.apache.axis2.databinding.types.Duration
Duration | public class Duration implements Serializable(Code) | | Implementation of the XML Schema type duration. Duration supports a minimum fractional second
precision of milliseconds.
See Also: XML Schema 3.2.6 |
Constructor Summary | |
public | Duration() | public | Duration(boolean negative, int aYears, int aMonths, int aDays, int aHours, int aMinutes, double aSeconds) | public | Duration(String duration) Constructs Duration from a String in an xsd:duration format - PnYnMnDTnHnMnS. | public | Duration(boolean negative, Calendar calendar) Constructs Duration from a Calendar. |
isNegative | boolean isNegative(Code) | | |
Duration | public Duration()(Code) | | Default no-arg constructor
|
Duration | public Duration(boolean negative, int aYears, int aMonths, int aDays, int aHours, int aMinutes, double aSeconds)(Code) | | Parameters: negative - Parameters: aYears - Parameters: aMonths - Parameters: aDays - Parameters: aHours - Parameters: aMinutes - Parameters: aSeconds - |
equals | public boolean equals(Object object)(Code) | | The equals method compares the time represented by duration object, not its string
representation. Hence, a duration object representing 65 minutes is considered equal to a
duration object representing 1 hour and 5 minutes.
Parameters: object - |
getAsCalendar | public Calendar getAsCalendar()(Code) | | Returns duration as a calendar. Due to the way a Calendar class works, the values for
particular fields may not be the same as obtained through getter methods. For example, if a
duration's object getMonths returns 20, a similar call on a calendar object will return 1
year and 8 months.
Calendar |
getAsCalendar | public Calendar getAsCalendar(Calendar startTime)(Code) | | Returns duration as a calendar. Due to the way a Calendar class works, the values for
particular fields may not be the same as obtained through getter methods. For example, if a
Duration's object getMonths returns 20, a similar call on a Calendar object will return 1
year and 8 months.
Parameters: startTime - Calendar Calendar |
getDays | public int getDays()(Code) | | |
getHours | public int getHours()(Code) | | |
getMinutes | public int getMinutes()(Code) | | |
getMonths | public int getMonths()(Code) | | |
getSeconds | public double getSeconds()(Code) | | |
getYears | public int getYears()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isNegative | public boolean isNegative()(Code) | | |
setDays | public void setDays(int days)(Code) | | Parameters: days - |
setHours | public void setHours(int hours)(Code) | | Parameters: hours - |
setMinutes | public void setMinutes(int minutes)(Code) | | Parameters: minutes - |
setMonths | public void setMonths(int months)(Code) | | Parameters: months - |
setNegative | public void setNegative(boolean negative)(Code) | | Parameters: negative - |
setSeconds | public void setSeconds(double seconds)(Code) | | Sets the seconds. NOTE: The fractional value of seconds is rounded up to milliseconds.
Parameters: seconds - double |
setYears | public void setYears(int years)(Code) | | Parameters: years - |
toString | public String toString()(Code) | | This returns the xml representation of an xsd:duration object.
|
|
|