[Java] Class BaseDuration
- groovy.time.BaseDuration
- All Implemented Interfaces and Traits:
- Comparable
public abstract class BaseDuration extends Object
Base class for date and time durations.
- Authors:
- John Wilson [email protected]
- See Also:
- Duration
Nested Class Summary
Modifiers | Name | Description |
---|---|---|
static class | BaseDuration.From |
Field Summary
Modifiers | Name | Description |
---|---|---|
protected int | days | |
protected int | hours | |
protected int | millis | |
protected int | minutes | |
protected int | months | |
protected int | seconds | |
protected int | years |
Constructor Summary
Constructor and description |
---|
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) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
int |
compareTo(BaseDuration otherDuration) | |
Date |
getAgo() | |
int |
getDays() | |
BaseDuration.From |
getFrom() | |
int |
getHours() | |
int |
getMillis() | |
int |
getMinutes() | |
int |
getMonths() | |
int |
getSeconds() | |
int |
getYears() | |
Date |
plus(Date date) | |
long |
toMilliseconds() | |
String |
toString() |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail
protected final int days
protected final int hours
protected final int millis
protected final int minutes
protected final int months
protected final int seconds
protected final int years
Constructor Detail
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 Detail
public int compareTo(BaseDuration otherDuration)
public Date getAgo()
public int getDays()
public BaseDuration.From getFrom()
public int getHours()
public int getMillis()
public int getMinutes()
public int getMonths()
public int getSeconds()
public int getYears()
public Date plus(Date date)
public long toMilliseconds()
public String toString()
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/groovy/time/BaseDuration.html