org.apache.ws.jaxme.util
Class Duration

java.lang.Object
  extended byorg.apache.ws.jaxme.util.Duration
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Duration
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Implementation of xs:duration.

Author:
Jochen Wiedmann
See Also:
Serialized Form

Constructor Summary
Duration(int pYears, int pMonths, int pDays, int pHours, int pMinutes, double pSeconds)
           
 
Method Summary
 int compareTo(Duration d)
           
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 int getDays()
          Returns the number of days.
 int getHours()
          Returns the number of hours.
 int getMinutes()
          Returns the number of minutes.
 int getMonths()
          Returns the number of months.
 double getSeconds()
          Returns the number of seconds.
 int getYears()
          Returns the number of years.
 int hashCode()
           
 java.lang.String toString()
          Returns a string representation of this Duration.
static Duration valueOf(java.lang.String pValue)
          Converts the given String representation into an instance of Duration.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Duration

public Duration(int pYears,
                int pMonths,
                int pDays,
                int pHours,
                int pMinutes,
                double pSeconds)
Method Detail

getYears

public int getYears()

Returns the number of years.


getMonths

public int getMonths()

Returns the number of months.


getDays

public int getDays()

Returns the number of days.


getHours

public int getHours()

Returns the number of hours.


getMinutes

public int getMinutes()

Returns the number of minutes.


getSeconds

public double getSeconds()

Returns the number of seconds.


toString

public java.lang.String toString()

Returns a string representation of this Duration.


valueOf

public static Duration valueOf(java.lang.String pValue)
                        throws java.text.ParseException

Converts the given String representation into an instance of Duration.

Throws:
java.text.ParseException - The String could not be parsed.

equals

public boolean equals(java.lang.Object o)

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(Duration d)

hashCode

public int hashCode()