equal
deleted
inserted
replaced
87 import java.util.concurrent.ConcurrentMap; |
87 import java.util.concurrent.ConcurrentMap; |
88 |
88 |
89 /** |
89 /** |
90 * A time-zone offset from Greenwich/UTC, such as {@code +02:00}. |
90 * A time-zone offset from Greenwich/UTC, such as {@code +02:00}. |
91 * <p> |
91 * <p> |
92 * A time-zone offset is the period of time that a time-zone differs from Greenwich/UTC. |
92 * A time-zone offset is the amount of time that a time-zone differs from Greenwich/UTC. |
93 * This is usually a fixed number of hours and minutes. |
93 * This is usually a fixed number of hours and minutes. |
94 * <p> |
94 * <p> |
95 * Different parts of the world have different time-zone offsets. |
95 * Different parts of the world have different time-zone offsets. |
96 * The rules for how offsets vary by place and time of year are captured in the |
96 * The rules for how offsets vary by place and time of year are captured in the |
97 * {@link ZoneId} class. |
97 * {@link ZoneId} class. |
332 * <p> |
332 * <p> |
333 * The conversion uses the {@link TemporalQueries#offset()} query, which relies |
333 * The conversion uses the {@link TemporalQueries#offset()} query, which relies |
334 * on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field. |
334 * on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field. |
335 * <p> |
335 * <p> |
336 * This method matches the signature of the functional interface {@link TemporalQuery} |
336 * This method matches the signature of the functional interface {@link TemporalQuery} |
337 * allowing it to be used in queries via method reference, {@code ZoneOffset::from}. |
337 * allowing it to be used as a query via method reference, {@code ZoneOffset::from}. |
338 * |
338 * |
339 * @param temporal the temporal object to convert, not null |
339 * @param temporal the temporal object to convert, not null |
340 * @return the zone-offset, not null |
340 * @return the zone-offset, not null |
341 * @throws DateTimeException if unable to convert to an {@code ZoneOffset} |
341 * @throws DateTimeException if unable to convert to an {@code ZoneOffset} |
342 */ |
342 */ |
562 } |
562 } |
563 |
563 |
564 /** |
564 /** |
565 * Gets the value of the specified field from this offset as an {@code int}. |
565 * Gets the value of the specified field from this offset as an {@code int}. |
566 * <p> |
566 * <p> |
567 * This queries this offset for the value for the specified field. |
567 * This queries this offset for the value of the specified field. |
568 * The returned value will always be within the valid range of values for the field. |
568 * The returned value will always be within the valid range of values for the field. |
569 * If it is not possible to return the value, because the field is not supported |
569 * If it is not possible to return the value, because the field is not supported |
570 * or for some other reason, an exception is thrown. |
570 * or for some other reason, an exception is thrown. |
571 * <p> |
571 * <p> |
572 * If the field is a {@link ChronoField} then the query is implemented here. |
572 * If the field is a {@link ChronoField} then the query is implemented here. |
597 } |
597 } |
598 |
598 |
599 /** |
599 /** |
600 * Gets the value of the specified field from this offset as a {@code long}. |
600 * Gets the value of the specified field from this offset as a {@code long}. |
601 * <p> |
601 * <p> |
602 * This queries this offset for the value for the specified field. |
602 * This queries this offset for the value of the specified field. |
603 * If it is not possible to return the value, because the field is not supported |
603 * If it is not possible to return the value, because the field is not supported |
604 * or for some other reason, an exception is thrown. |
604 * or for some other reason, an exception is thrown. |
605 * <p> |
605 * <p> |
606 * If the field is a {@link ChronoField} then the query is implemented here. |
606 * If the field is a {@link ChronoField} then the query is implemented here. |
607 * The {@code OFFSET_SECONDS} field returns the value of the offset. |
607 * The {@code OFFSET_SECONDS} field returns the value of the offset. |