org.apache.axis.types
Class Duration
java.lang.Object
|
+--org.apache.axis.types.Duration
- All Implemented Interfaces:
- java.io.Serializable
- public class Duration
- extends java.lang.Object
- implements java.io.Serializable
Implementation of the XML Schema type duration
- Author:
- Wes Moulder
- See Also:
- XML Schema 3.2.6, Serialized Form
Constructor Summary |
Duration()
Default no-arg constructor |
Duration(boolean negative,
int aYears,
int aMonths,
int aDays,
int aHours,
int aMinutes,
double aSeconds)
|
Duration(java.lang.String duration)
This method takes a string that represents an xsd:duration and parses it. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Duration
public Duration()
- Default no-arg constructor
Duration
public Duration(boolean negative,
int aYears,
int aMonths,
int aDays,
int aHours,
int aMinutes,
double aSeconds)
- Parameters:
negative
- aYears
- aMonths
- aDays
- aHours
- aMinutes
- aSeconds
-
Duration
public Duration(java.lang.String duration)
throws java.lang.IllegalArgumentException
- This method takes a string that represents an xsd:duration and parses it.
- Parameters:
duration
- - Throws:
SchemaException
- if the string doesn't parse correctly.
parseTime
public void parseTime(java.lang.String time)
- This method parses the time portion of a duration.
- Parameters:
time
-
parseDate
public void parseDate(java.lang.String date)
- This method parses the date portion of a duration.
- Parameters:
date
-
isNegative
public boolean isNegative()
getYears
public int getYears()
getMonths
public int getMonths()
getDays
public int getDays()
getHours
public int getHours()
getMinutes
public int getMinutes()
getSeconds
public double getSeconds()
setNegative
public void setNegative(boolean negative)
- Parameters:
negative
-
setYears
public void setYears(int years)
- Parameters:
years
-
setMonths
public void setMonths(int months)
- Parameters:
months
-
setDays
public void setDays(int days)
- Parameters:
days
-
setHours
public void setHours(int hours)
- Parameters:
hours
-
setMinutes
public void setMinutes(int minutes)
- Parameters:
minutes
-
setSeconds
public void setSeconds(int seconds)
- Parameters:
seconds
-
toString
public java.lang.String toString()
- This returns the xml representation of an xsd:duration object.
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object object)
- This currently does a verbatim check on the object. If you have a
duration that is 60 minutes, and one that is 1 hour, they won't
be equal.
- Overrides:
equals
in class java.lang.Object
- Parameters:
object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2003 Apache Web Services Project. All Rights Reserved.