Groovy Documentation

groovy.time
[Java] Class BaseDuration

java.lang.Object
  groovy.time.BaseDuration
All Implemented Interfaces:
java.lang.Comparable

public abstract class BaseDuration
extends java.lang.Object

Base class for date and time durations.

Authors:
John Wilson tug@wilson.co.uk
See Also:
Duration


Nested Class Summary
static class BaseDuration.From

 
Field Summary
protected int days

protected int hours

protected int millis

protected int minutes

protected int months

protected int seconds

protected int years

 
Constructor Summary
protected BaseDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis)

protected BaseDuration(int days, int hours, int minutes, int seconds, int millis)

 
Method Summary
int compareTo(BaseDuration otherDuration)

java.util.Date getAgo()

int getDays()

BaseDuration.From getFrom()

int getHours()

int getMillis()

int getMinutes()

int getMonths()

int getSeconds()

int getYears()

java.util.Date plus(java.util.Date date)

long toMilliseconds()

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

days

protected final int days


hours

protected final int hours


millis

protected final int millis


minutes

protected final int minutes


months

protected final int months


seconds

protected final int seconds


years

protected final int years


 
Constructor Detail

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 Detail

compareTo

public int compareTo(BaseDuration otherDuration)


getAgo

public java.util.Date getAgo()


getDays

public int getDays()


getFrom

public BaseDuration.From getFrom()


getHours

public int getHours()


getMillis

public int getMillis()


getMinutes

public int getMinutes()


getMonths

public int getMonths()


getSeconds

public int getSeconds()


getYears

public int getYears()


plus

public java.util.Date plus(java.util.Date date)


toMilliseconds

public long toMilliseconds()


toString

public java.lang.String toString()


 

Groovy Documentation