Package groovy.time
Class BaseDuration
java.lang.Object
groovy.time.BaseDuration
- All Implemented Interfaces:
Comparable<BaseDuration>
- Direct Known Subclasses:
DatumDependentDuration
,Duration
Base class for date and time durations.
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseDuration
(int days, int hours, int minutes, int seconds, int millis) protected
BaseDuration
(int years, int months, int days, int hours, int minutes, int seconds, int millis) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(BaseDuration otherDuration) abstract Date
getAgo()
int
getDays()
abstract BaseDuration.From
getFrom()
int
getHours()
int
int
int
int
int
getYears()
abstract long
toString()
-
Field Details
-
years
protected final int years -
months
protected final int months -
days
protected final int days -
hours
protected final int hours -
minutes
protected final int minutes -
seconds
protected final int seconds -
millis
protected final int millis
-
-
Constructor Details
-
BaseDuration
protected BaseDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis) -
BaseDuration
protected BaseDuration(int days, int hours, int minutes, int seconds, int millis)
-
-
Method Details
-
getYears
public int getYears() -
getMonths
public int getMonths() -
getDays
public int getDays() -
getHours
public int getHours() -
getMinutes
public int getMinutes() -
getSeconds
public int getSeconds() -
getMillis
public int getMillis() -
plus
-
toString
-
toMilliseconds
public abstract long toMilliseconds() -
getAgo
-
getFrom
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BaseDuration>
-