org.deegree.commons.utils.time
Class Duration
java.lang.Object
org.deegree.commons.utils.time.Duration
public class Duration
- extends Object
This class stores a time duration.
A Duration
object is immutable.
- Version:
- $Revision: 18171 $, $Date: 2009-06-17 16:00:07 +0200 (Mi, 17 Jun 2009) $
- Author:
- Oliver Tonnhofer, last edited by: $Author: mschneider $
Constructor Summary |
Duration(int years,
int months,
int days,
int hours,
int minutes,
int seconds)
|
Duration
public Duration(int years,
int months,
int days,
int hours,
int minutes,
int seconds)
- Parameters:
years
- months
- days
- hours
- minutes
- seconds
-
getDateBefore
public Date getDateBefore(Date date)
- Parameters:
date
-
- Returns:
- a new date that is before the given date
getDateAfter
public Date getDateAfter(Date date)
- Parameters:
date
-
- Returns:
- a new date that is after the given date
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
getDays
public int getDays()
- Returns:
- the days
getHours
public int getHours()
- Returns:
- the hours
getMinutes
public int getMinutes()
- Returns:
- the minutes
getMonths
public int getMonths()
- Returns:
- the months
getSeconds
public int getSeconds()
- Returns:
- the seconds
getYears
public int getYears()
- Returns:
- the years
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>