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: 30119 $, $Date: 2011-03-22 10:02:35 +0100 (Tue, 22 Mar 2011) $
- Author:
- Oliver Tonnhofer, last edited by: $Author: aschmitz $
|
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
Copyright © 2011. All Rights Reserved.