TemporalAmount

Interface TemporalAmount

All Known Subinterfaces:
ChronoPeriod
All Known Implementing Classes:
Duration, Period
public interface TemporalAmount

Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months".

This is the base interface type for amounts of time. An amount is distinct from a date or time-of-day in that it is not tied to any specific point on the time-line.

The amount can be thought of as a Map of TemporalUnit to long, exposed via getUnits() and 登录查看完整内容