org.deegree.commons.utils.time
Class Duration
java.lang.Object
org.deegree.commons.utils.time.Duration
public class Duration
- extends java.lang.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)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Duration
public Duration(int years,
int months,
int days,
int hours,
int minutes,
int seconds)
- Parameters:
years
- months
- days
- hours
- minutes
- seconds
-
getDateBefore
public java.util.Date getDateBefore(java.util.Date date)
- Parameters:
date
-
- Returns:
- a new date that is before the given date
getDateAfter
public java.util.Date getDateAfter(java.util.Date date)
- Parameters:
date
-
- Returns:
- a new date that is after the given date
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.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.