Module java.base

Interface Era

All Superinterfaces:
TemporalAccessor, TemporalAdjuster
All Known Implementing Classes:
HijrahEra, IsoEra, JapaneseEra, MinguoEra, ThaiBuddhistEra

public interface Era extends TemporalAccessor, TemporalAdjuster
An era of the time-line.

Most calendar systems have a single epoch dividing the time-line into two eras. However, some calendar systems, have multiple eras, such as one for the reign of each leader. In all cases, the era is conceptually the largest division of the time-line. Each chronology defines the Era's that are known Eras and a Chronology.eras to get the valid eras.

For example, the Thai Buddhist calendar system divides time into two eras, before and after a single date. By contrast, the Japanese calendar system has one era for the reign of each Emperor.

Instances of Era may be compared using the == operator.

Implementation Requirements:
This interface must be implemented with care to ensure other classes operate correctly. All implementations must be singletons - final, immutable and thread-safe. It is recommended to use an enum whenever possible.
Since:
1.8