< prev index next >

src/java.base/share/classes/java/time/LocalTime.java

Print this page

 108  * It cannot represent an instant on the time-line without additional information
 109  * such as an offset or time-zone.
 110  * <p>
 111  * The ISO-8601 calendar system is the modern civil calendar system used today
 112  * in most of the world. This API assumes that all calendar systems use the same
 113  * representation, this class, for time-of-day.
 114  * <p>
 115  * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
 116  * class; programmers should treat instances that are
 117  * {@linkplain #equals(Object) equal} as interchangeable and should not
 118  * use instances for synchronization, or unpredictable behavior may
 119  * occur. For example, in a future release, synchronization may fail.
 120  * The {@code equals} method should be used for comparisons.
 121  *
 122  * @implSpec
 123  * This class is immutable and thread-safe.
 124  *
 125  * @since 1.8
 126  */
 127 @jdk.internal.ValueBased

 128 public final class LocalTime
 129         implements Temporal, TemporalAdjuster, Comparable<LocalTime>, Serializable {
 130 
 131     /**
 132      * The minimum supported {@code LocalTime}, '00:00'.
 133      * This is the time of midnight at the start of the day.
 134      */
 135     public static final LocalTime MIN;
 136     /**
 137      * The maximum supported {@code LocalTime}, '23:59:59.999999999'.
 138      * This is the time just before midnight at the end of the day.
 139      */
 140     public static final LocalTime MAX;
 141     /**
 142      * The time of midnight at the start of the day, '00:00'.
 143      */
 144     public static final LocalTime MIDNIGHT;
 145     /**
 146      * The time of noon in the middle of the day, '12:00'.
 147      */

 108  * It cannot represent an instant on the time-line without additional information
 109  * such as an offset or time-zone.
 110  * <p>
 111  * The ISO-8601 calendar system is the modern civil calendar system used today
 112  * in most of the world. This API assumes that all calendar systems use the same
 113  * representation, this class, for time-of-day.
 114  * <p>
 115  * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
 116  * class; programmers should treat instances that are
 117  * {@linkplain #equals(Object) equal} as interchangeable and should not
 118  * use instances for synchronization, or unpredictable behavior may
 119  * occur. For example, in a future release, synchronization may fail.
 120  * The {@code equals} method should be used for comparisons.
 121  *
 122  * @implSpec
 123  * This class is immutable and thread-safe.
 124  *
 125  * @since 1.8
 126  */
 127 @jdk.internal.ValueBased
 128 @jdk.internal.MigratedValueClass
 129 public final class LocalTime
 130         implements Temporal, TemporalAdjuster, Comparable<LocalTime>, Serializable {
 131 
 132     /**
 133      * The minimum supported {@code LocalTime}, '00:00'.
 134      * This is the time of midnight at the start of the day.
 135      */
 136     public static final LocalTime MIN;
 137     /**
 138      * The maximum supported {@code LocalTime}, '23:59:59.999999999'.
 139      * This is the time just before midnight at the end of the day.
 140      */
 141     public static final LocalTime MAX;
 142     /**
 143      * The time of midnight at the start of the day, '00:00'.
 144      */
 145     public static final LocalTime MIDNIGHT;
 146     /**
 147      * The time of noon in the middle of the day, '12:00'.
 148      */
< prev index next >