TemporalQueries.offset

A query for {@code ZoneOffset} returning null if not found. !(p) This returns a {@code TemporalQuery} that can be used to query a temporal object for the offset. The query will return null if the temporal object cannot supply an offset. !(p) The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field and uses it to create a {@code ZoneOffset}. !(p) The method {@link hunt.time.ZoneOffset#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}. This query and {@code ZoneOffset::from} will return the same result if the temporal object contains an offset. If the temporal object does not contain an offset, then the method reference will throw an exception, whereas this query will return null.

@return a query that can obtain the offset of a temporal, not null

class TemporalQueries
static
offset
()

Meta