100 * Each HijrahDate is created bound to a particular HijrahChronology,
101 * The same chronology is propagated to each HijrahDate computed from the date.
102 * To use a different Hijrah variant, its HijrahChronology can be used
103 * to create new HijrahDate instances.
104 * Alternatively, the {@link #withVariant} method can be used to convert
105 * to a new HijrahChronology.
106 * <p>
107 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
108 * class; programmers should treat instances that are
109 * {@linkplain #equals(Object) equal} as interchangeable and should not
110 * use instances for synchronization, or unpredictable behavior may
111 * occur. For example, in a future release, synchronization may fail.
112 * The {@code equals} method should be used for comparisons.
113 *
114 * @implSpec
115 * This class is immutable and thread-safe.
116 *
117 * @since 1.8
118 */
119 @jdk.internal.ValueBased
120 public final class HijrahDate
121 extends ChronoLocalDateImpl<HijrahDate>
122 implements ChronoLocalDate, Serializable {
123
124 /**
125 * Serialization version.
126 */
127 @java.io.Serial
128 private static final long serialVersionUID = -5207853542612002020L;
129 /**
130 * The Chronology of this HijrahDate.
131 */
132 private final transient HijrahChronology chrono;
133 /**
134 * The proleptic year.
135 */
136 private final transient int prolepticYear;
137 /**
138 * The month-of-year.
139 */
|
100 * Each HijrahDate is created bound to a particular HijrahChronology,
101 * The same chronology is propagated to each HijrahDate computed from the date.
102 * To use a different Hijrah variant, its HijrahChronology can be used
103 * to create new HijrahDate instances.
104 * Alternatively, the {@link #withVariant} method can be used to convert
105 * to a new HijrahChronology.
106 * <p>
107 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
108 * class; programmers should treat instances that are
109 * {@linkplain #equals(Object) equal} as interchangeable and should not
110 * use instances for synchronization, or unpredictable behavior may
111 * occur. For example, in a future release, synchronization may fail.
112 * The {@code equals} method should be used for comparisons.
113 *
114 * @implSpec
115 * This class is immutable and thread-safe.
116 *
117 * @since 1.8
118 */
119 @jdk.internal.ValueBased
120 @jdk.internal.MigratedValueClass
121 public final class HijrahDate
122 extends ChronoLocalDateImpl<HijrahDate>
123 implements ChronoLocalDate, Serializable {
124
125 /**
126 * Serialization version.
127 */
128 @java.io.Serial
129 private static final long serialVersionUID = -5207853542612002020L;
130 /**
131 * The Chronology of this HijrahDate.
132 */
133 private final transient HijrahChronology chrono;
134 /**
135 * The proleptic year.
136 */
137 private final transient int prolepticYear;
138 /**
139 * The month-of-year.
140 */
|