deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.utils.time
Class Duration

java.lang.Object
  extended by 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)
           
 
Method Summary
 boolean equals(Object obj)
           
 Date getDateAfter(Date date)
           
 Date getDateBefore(Date date)
           
 int getDays()
           
 int getHours()
           
 int getMinutes()
           
 int getMonths()
           
 int getSeconds()
           
 int getYears()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Duration

public Duration(int years,
                int months,
                int days,
                int hours,
                int minutes,
                int seconds)
Parameters:
years -
months -
days -
hours -
minutes -
seconds -
Method Detail

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

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>