87 /**
88 * A date in the Minguo calendar system.
89 * <p>
90 * This date operates using the {@linkplain MinguoChronology Minguo calendar}.
91 * This calendar system is primarily used in the Republic of China, often known as Taiwan.
92 * Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
93 * <p>
94 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
95 * class; programmers should treat instances that are
96 * {@linkplain #equals(Object) equal} as interchangeable and should not
97 * use instances for synchronization, or unpredictable behavior may
98 * occur. For example, in a future release, synchronization may fail.
99 * The {@code equals} method should be used for comparisons.
100 *
101 * @implSpec
102 * This class is immutable and thread-safe.
103 *
104 * @since 1.8
105 */
106 @jdk.internal.ValueBased
107 public final class MinguoDate
108 extends ChronoLocalDateImpl<MinguoDate>
109 implements ChronoLocalDate, Serializable {
110
111 /**
112 * Serialization version.
113 */
114 @java.io.Serial
115 private static final long serialVersionUID = 1300372329181994526L;
116
117 /**
118 * The underlying date.
119 */
120 private final transient LocalDate isoDate;
121
122 //-----------------------------------------------------------------------
123 /**
124 * Obtains the current {@code MinguoDate} from the system clock in the default time-zone.
125 * <p>
126 * This will query the {@link Clock#systemDefaultZone() system clock} in the default
|
87 /**
88 * A date in the Minguo calendar system.
89 * <p>
90 * This date operates using the {@linkplain MinguoChronology Minguo calendar}.
91 * This calendar system is primarily used in the Republic of China, often known as Taiwan.
92 * Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
93 * <p>
94 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
95 * class; programmers should treat instances that are
96 * {@linkplain #equals(Object) equal} as interchangeable and should not
97 * use instances for synchronization, or unpredictable behavior may
98 * occur. For example, in a future release, synchronization may fail.
99 * The {@code equals} method should be used for comparisons.
100 *
101 * @implSpec
102 * This class is immutable and thread-safe.
103 *
104 * @since 1.8
105 */
106 @jdk.internal.ValueBased
107 @jdk.internal.MigratedValueClass
108 public final class MinguoDate
109 extends ChronoLocalDateImpl<MinguoDate>
110 implements ChronoLocalDate, Serializable {
111
112 /**
113 * Serialization version.
114 */
115 @java.io.Serial
116 private static final long serialVersionUID = 1300372329181994526L;
117
118 /**
119 * The underlying date.
120 */
121 private final transient LocalDate isoDate;
122
123 //-----------------------------------------------------------------------
124 /**
125 * Obtains the current {@code MinguoDate} from the system clock in the default time-zone.
126 * <p>
127 * This will query the {@link Clock#systemDefaultZone() system clock} in the default
|