|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.util.Duration
public class Duration
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(Duration d)
Actual implementation of compareTo(Object) . |
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. |
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()
|
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 |
---|
public Duration(boolean pNegative, int pYears, int pMonths, int pDays, int pHours, int pMinutes, int pSeconds, long pMillis)
Method Detail |
---|
public int getYears()
Returns the number of years.
public int getMonths()
Returns the number of months.
public int getDays()
Returns the number of days.
public int getHours()
Returns the number of hours.
public int getMinutes()
Returns the number of minutes.
public int getSeconds()
Returns the number of seconds.
public long getMillis()
Returns the number of milliseconds.
public java.lang.String toString()
Returns a string representation of this Duration.
toString
in class java.lang.Object
public static Duration valueOf(java.lang.String pValue)
Converts the given String representation into an instance of Duration.
java.lang.IllegalArgumentException
- The String could not be parsed.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int compareTo(Duration d)
compareTo(Object)
.
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |