99 * {@code OffsetTime} is an immutable date-time object that represents a time, often
100 * viewed as hour-minute-second-offset.
101 * This class stores all time fields, to a precision of nanoseconds,
102 * as well as a zone offset.
103 * For example, the value "13:45:30.123456789+02:00" can be stored
104 * in an {@code OffsetTime}.
105 * <p>
106 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
107 * class; programmers should treat instances that are
108 * {@linkplain #equals(Object) equal} as interchangeable and should not
109 * use instances for synchronization, or unpredictable behavior may
110 * occur. For example, in a future release, synchronization may fail.
111 * The {@code equals} method should be used for comparisons.
112 *
113 * @implSpec
114 * This class is immutable and thread-safe.
115 *
116 * @since 1.8
117 */
118 @jdk.internal.ValueBased
119 public final class OffsetTime
120 implements Temporal, TemporalAdjuster, Comparable<OffsetTime>, Serializable {
121
122 /**
123 * The minimum supported {@code OffsetTime}, '00:00:00+18:00'.
124 * This is the time of midnight at the start of the day in the maximum offset
125 * (larger offsets are earlier on the time-line).
126 * This combines {@link LocalTime#MIN} and {@link ZoneOffset#MAX}.
127 * This could be used by an application as a "far past" date.
128 */
129 public static final OffsetTime MIN = LocalTime.MIN.atOffset(ZoneOffset.MAX);
130 /**
131 * The maximum supported {@code OffsetTime}, '23:59:59.999999999-18:00'.
132 * This is the time just before midnight at the end of the day in the minimum offset
133 * (larger negative offsets are later on the time-line).
134 * This combines {@link LocalTime#MAX} and {@link ZoneOffset#MIN}.
135 * This could be used by an application as a "far future" date.
136 */
137 public static final OffsetTime MAX = LocalTime.MAX.atOffset(ZoneOffset.MIN);
138
|
99 * {@code OffsetTime} is an immutable date-time object that represents a time, often
100 * viewed as hour-minute-second-offset.
101 * This class stores all time fields, to a precision of nanoseconds,
102 * as well as a zone offset.
103 * For example, the value "13:45:30.123456789+02:00" can be stored
104 * in an {@code OffsetTime}.
105 * <p>
106 * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
107 * class; programmers should treat instances that are
108 * {@linkplain #equals(Object) equal} as interchangeable and should not
109 * use instances for synchronization, or unpredictable behavior may
110 * occur. For example, in a future release, synchronization may fail.
111 * The {@code equals} method should be used for comparisons.
112 *
113 * @implSpec
114 * This class is immutable and thread-safe.
115 *
116 * @since 1.8
117 */
118 @jdk.internal.ValueBased
119 @jdk.internal.MigratedValueClass
120 public final class OffsetTime
121 implements Temporal, TemporalAdjuster, Comparable<OffsetTime>, Serializable {
122
123 /**
124 * The minimum supported {@code OffsetTime}, '00:00:00+18:00'.
125 * This is the time of midnight at the start of the day in the maximum offset
126 * (larger offsets are earlier on the time-line).
127 * This combines {@link LocalTime#MIN} and {@link ZoneOffset#MAX}.
128 * This could be used by an application as a "far past" date.
129 */
130 public static final OffsetTime MIN = LocalTime.MIN.atOffset(ZoneOffset.MAX);
131 /**
132 * The maximum supported {@code OffsetTime}, '23:59:59.999999999-18:00'.
133 * This is the time just before midnight at the end of the day in the minimum offset
134 * (larger negative offsets are later on the time-line).
135 * This combines {@link LocalTime#MAX} and {@link ZoneOffset#MIN}.
136 * This could be used by an application as a "far future" date.
137 */
138 public static final OffsetTime MAX = LocalTime.MAX.atOffset(ZoneOffset.MIN);
139
|