it.amattioli.encapsulate.dates
Interface Duration

Show UML class diagram
All Known Implementing Classes:
CompositeDuration, ConventionalDuration, PhysicalDuration

public interface Duration

A time interval duration. A duration is something that can be added or subtracted from a point in time to obtain another point in time.


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.
 

Method Detail

after

Date after(Date begin)
Returns the time point obtained summing this duration to the given time point

Parameters:
begin -
Returns:

before

Date before(Date begin)
Returns the time point obtained subtracting this duration to the given time point

Parameters:
begin -
Returns:

plus

Duration plus(Duration d)
Add this duration to another to obtain another duration.

Parameters:
d -
Returns:


Copyright © 2011. All Rights Reserved.