it.amattioli.encapsulate.dates
Class ConventionalDuration
java.lang.Object
it.amattioli.encapsulate.dates.ConventionalDuration
- All Implemented Interfaces:
- Duration
public class ConventionalDuration
- extends Object
- implements Duration
|
Method Summary |
Date |
after(Date begin)
Returns the time point obtained summing this duration to the given time point |
Date |
before(Date begin)
Returns the time point obtained subtracting this duration to the given time point |
Duration |
plus(Duration d)
Add this duration to another to obtain another duration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ONE_YEAR
public static final ConventionalDuration ONE_YEAR
ONE_MONTH
public static final ConventionalDuration ONE_MONTH
ONE_WEEK
public static final ConventionalDuration ONE_WEEK
ONE_DAY
public static final ConventionalDuration ONE_DAY
ConventionalDuration
public ConventionalDuration(ConventionalDuration.Type type,
int amount)
ConventionalDuration
public ConventionalDuration(Day start,
Day end)
ConventionalDuration
public ConventionalDuration(Month start,
Month end)
ConventionalDuration
public ConventionalDuration(Year start,
Year end)
after
public Date after(Date begin)
- Description copied from interface:
Duration
- Returns the time point obtained summing this duration to the given time point
- Specified by:
after in interface Duration
- Returns:
before
public Date before(Date begin)
- Description copied from interface:
Duration
- Returns the time point obtained subtracting this duration to the given time point
- Specified by:
before in interface Duration
- Returns:
plus
public Duration plus(Duration d)
- Description copied from interface:
Duration
- Add this duration to another to obtain another duration.
- Specified by:
plus in interface Duration
- Returns:
Copyright © 2011. All Rights Reserved.