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