Years is an immutable period that can only store years. It does not store years, days or hours for example. As such it is a type-safe way of representing a number of years in an application.
The number of years is set in the constructor, and may be queried using getYears(). Basic mathematical operations are provided - plus(), minus(), multipliedBy() and dividedBy().
Years is thread-safe and immutable.
@author Stephen Colebourne
@since 1.4
| |
| |
| |
| |