org.apache.ws.jaxme.util

Class Duration

Implemented Interfaces:
Comparable, Serializable

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

Implementation of xs:duration.

Constructor Summary

Duration(boolean pNegative, int pYears, int pMonths, int pDays, int pHours, int pMinutes, int pSeconds, long pMillis)
Creates a new instance with the given values.

Method Summary

int
compareTo(Object o)
int
compareTo(Duration d)
Actual implementation of compareTo(Object).
boolean
equals(Object o)
int
getDays()
Returns the number of days.
int
getHours()
Returns the number of hours.
long
getMillis()
Returns the number of milliseconds.
int
getMinutes()
Returns the number of minutes.
int
getMonths()
Returns the number of months.
int
getSeconds()
Returns the number of seconds.
int
getYears()
Returns the number of years.
int
hashCode()
String
toString()
Returns a string representation of this Duration.
static Duration
valueOf(String pValue)
Converts the given String representation into an instance of Duration.

Constructor Details

Duration

public Duration(boolean pNegative,
                int pYears,
                int pMonths,
                int pDays,
                int pHours,
                int pMinutes,
                int pSeconds,
                long pMillis)
Creates a new instance with the given values.

Method Details

compareTo

public int compareTo(Object o)

compareTo

public int compareTo(Duration d)
Actual implementation of compareTo(Object).

equals

public boolean equals(Object o)

getDays

public int getDays()
Returns the number of days.

getHours

public int getHours()
Returns the number of hours.

getMillis

public long getMillis()
Returns the number of milliseconds.

getMinutes

public int getMinutes()
Returns the number of minutes.

getMonths

public int getMonths()
Returns the number of months.

getSeconds

public int getSeconds()
Returns the number of seconds.

getYears

public int getYears()
Returns the number of years.

hashCode

public int hashCode()

toString

public String toString()
Returns a string representation of this Duration.

valueOf

public static Duration valueOf(String pValue)
Converts the given String representation into an instance of Duration.