Package org.geotools.xml.impl
Class Duration
Object
Duration
- All Implemented Interfaces:
Serializable
,Comparable<Duration>
Implementation of xs:duration.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDuration
(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
Modifier and TypeMethodDescriptionint
Actual implementation ofComparable.compareTo(Object)
.boolean
int
getDays()
Returns the number of days.int
getHours()
Returns the number of hours.long
Returns the number of milliseconds.int
Returns the number of minutes.int
Returns the number of months.int
Returns the number of seconds.int
getYears()
Returns the number of years.int
hashCode()
toString()
Returns a string representation of this Duration.static Duration
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
-
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 int getSeconds()Returns the number of seconds. -
getMillis
public long getMillis()Returns the number of milliseconds. -
toString
Returns a string representation of this Duration. -
valueOf
Converts the given String representation into an instance of Duration.- Throws:
IllegalArgumentException
- The String could not be parsed.
-
equals
-
compareTo
Actual implementation ofComparable.compareTo(Object)
.- Specified by:
compareTo
in interfaceComparable<Duration>
-
hashCode
public int hashCode()
-