public class Duration extends Object implements Serializable, Comparable
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Duration d)
Actual implementation of
compareTo(Object) . |
int |
compareTo(Object o) |
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.
|
public Duration(boolean pNegative, int pYears, int pMonths, int pDays, int pHours, int pMinutes, int pSeconds, long pMillis)
public int getYears()
public int getMonths()
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public long getMillis()
public String toString()
public static Duration valueOf(String pValue)
IllegalArgumentException
- The String could not be parsed.public int compareTo(Object o)
compareTo
in interface Comparable
public int compareTo(Duration d)
compareTo(Object)
.Copyright © 1996–2019 Geotools. All rights reserved.