< prev index next >

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

Print this page




  87 import java.time.temporal.TemporalQueries;
  88 import java.time.temporal.TemporalQuery;
  89 import java.time.temporal.TemporalUnit;
  90 import java.time.temporal.UnsupportedTemporalTypeException;
  91 import java.time.temporal.ValueRange;
  92 import java.time.zone.ZoneRules;
  93 import java.util.Objects;
  94 
  95 /**
  96  * A time with an offset from UTC/Greenwich in the ISO-8601 calendar system,
  97  * such as {@code 10:15:30+01:00}.
  98  * <p>
  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  *
 106  * <p>
 107  * This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
 108  * class; use of identity-sensitive operations (including reference equality
 109  * ({@code ==}), identity hash code, or synchronization) on instances of
 110  * {@code OffsetTime} may have unpredictable results and should be avoided.
 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 public final class OffsetTime
 119         implements Temporal, TemporalAdjuster, Comparable<OffsetTime>, Serializable {
 120 
 121     /**
 122      * The minimum supported {@code OffsetTime}, '00:00:00+18:00'.
 123      * This is the time of midnight at the start of the day in the maximum offset
 124      * (larger offsets are earlier on the time-line).
 125      * This combines {@link LocalTime#MIN} and {@link ZoneOffset#MAX}.
 126      * This could be used by an application as a "far past" date.
 127      */




  87 import java.time.temporal.TemporalQueries;
  88 import java.time.temporal.TemporalQuery;
  89 import java.time.temporal.TemporalUnit;
  90 import java.time.temporal.UnsupportedTemporalTypeException;
  91 import java.time.temporal.ValueRange;
  92 import java.time.zone.ZoneRules;
  93 import java.util.Objects;
  94 
  95 /**
  96  * A time with an offset from UTC/Greenwich in the ISO-8601 calendar system,
  97  * such as {@code 10:15:30+01:00}.
  98  * <p>
  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  *
 106  * <p>
 107  * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
 108  * class; use of identity-sensitive operations (including reference equality
 109  * ({@code ==}), identity hash code, or synchronization) on instances of
 110  * {@code OffsetTime} may have unpredictable results and should be avoided.
 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 public final class OffsetTime
 119         implements Temporal, TemporalAdjuster, Comparable<OffsetTime>, Serializable {
 120 
 121     /**
 122      * The minimum supported {@code OffsetTime}, '00:00:00+18:00'.
 123      * This is the time of midnight at the start of the day in the maximum offset
 124      * (larger offsets are earlier on the time-line).
 125      * This combines {@link LocalTime#MIN} and {@link ZoneOffset#MAX}.
 126      * This could be used by an application as a "far past" date.
 127      */


< prev index next >