Package org.geotools.xml.impl
Class Duration
- Object
- 
- Duration
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Duration>
 
 public class Duration extends Object implements Serializable, Comparable<Duration> Implementation of xs:duration.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description 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 SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Duration d)Actual implementation ofComparable.compareTo(Object).booleanequals(Object o)intgetDays()Returns the number of days.intgetHours()Returns the number of hours.longgetMillis()Returns the number of milliseconds.intgetMinutes()Returns the number of minutes.intgetMonths()Returns the number of months.intgetSeconds()Returns the number of seconds.intgetYears()Returns the number of years.inthashCode()StringtoString()Returns a string representation of this Duration.static DurationvalueOf(String pValue)Converts the given String representation into an instance of Duration.
 
- 
- 
- 
Method Detail- 
getYearspublic int getYears() Returns the number of years.
 - 
getMonthspublic int getMonths() Returns the number of months.
 - 
getDayspublic int getDays() Returns the number of days.
 - 
getHourspublic int getHours() Returns the number of hours.
 - 
getMinutespublic int getMinutes() Returns the number of minutes.
 - 
getSecondspublic int getSeconds() Returns the number of seconds.
 - 
getMillispublic long getMillis() Returns the number of milliseconds.
 - 
toStringpublic String toString() Returns a string representation of this Duration.
 - 
valueOfpublic static Duration valueOf(String pValue) Converts the given String representation into an instance of Duration.- Throws:
- IllegalArgumentException- The String could not be parsed.
 
 - 
compareTopublic int compareTo(Duration d) Actual implementation ofComparable.compareTo(Object).- Specified by:
- compareToin interface- Comparable<Duration>
 
 
- 
 
-