Package groovy.time
Class BaseDuration
- java.lang.Object
-
- groovy.time.BaseDuration
-
- All Implemented Interfaces:
Comparable<BaseDuration>
- Direct Known Subclasses:
DatumDependentDuration
,Duration
public abstract class BaseDuration extends Object implements Comparable<BaseDuration>
Base class for date and time durations.- See Also:
Duration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseDuration.From
-
Constructor Summary
Constructors Modifier Constructor Description protected
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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(BaseDuration otherDuration)
abstract Date
getAgo()
int
getDays()
abstract BaseDuration.From
getFrom()
int
getHours()
int
getMillis()
int
getMinutes()
int
getMonths()
int
getSeconds()
int
getYears()
Date
plus(Date date)
abstract long
toMilliseconds()
String
toString()
-
-
-
Method Detail
-
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()
-
toMilliseconds
public abstract long toMilliseconds()
-
getAgo
public abstract Date getAgo()
-
getFrom
public abstract BaseDuration.From getFrom()
-
compareTo
public int compareTo(BaseDuration otherDuration)
- Specified by:
compareTo
in interfaceComparable<BaseDuration>
-
-