it.amattioli.encapsulate.dates
Class CompositeDuration
java.lang.Object
it.amattioli.encapsulate.dates.CompositeDuration
- All Implemented Interfaces:
- Duration
public class CompositeDuration
- extends Object
- implements Duration
|
Method Summary |
void |
add(Duration newDuration)
|
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 |
CompositeDuration
public CompositeDuration()
CompositeDuration
public CompositeDuration(Duration... newDurations)
add
public void add(Duration newDuration)
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:
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:
Copyright © 2011. All Rights Reserved.