ZoneOffset (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Comparable<ZoneOffset>, TemporalAccessor, TemporalAdjuster
-
Field Summary
Fields
Constant for the maximum supported offset.
Constant for the minimum supported offset.
The time-zone offset for UTC, with an ID of 'Z'.
-
Method Summary
Adjusts the specified temporal object to have the same offset as this object.
intCompares this offset to another offset in descending order.
booleanChecks if this offset is equal to another offset.
Obtains an instance of
ZoneOffsetfrom a temporal object.intGets the value of the specified field from this offset as an
int.getId()Gets the normalized zone offset ID.
longGets the value of the specified field from this offset as a
long.getRules()Gets the associated time-zone rules.
intGets the total zone offset in seconds.
inthashCode()A hash code for this offset.
booleanChecks if the specified field is supported.
Obtains an instance of
ZoneOffsetusing the ID.ofHours(int hours) Obtains an instance of
ZoneOffsetusing an offset in hours.ofHoursMinutes(int hours, int minutes) Obtains an instance of
ZoneOffsetusing an offset in hours and minutes.ofHoursMinutesSeconds(int hours, int minutes, int seconds) Obtains an instance of
ZoneOffsetusing an offset in hours, minutes and seconds.ofTotalSeconds(int totalSeconds) Obtains an instance of
ZoneOffsetspecifying the total offset in seconds<R> RQueries this offset using the specified query.
Gets the range of valid values for the specified field.
toString()Outputs this offset as a
String, using the normalized ID.Methods declared in class ZoneId
getAvailableZoneIds, getDisplayName, normalized, of, ofOffset, systemDefaultGets the set of available zone IDs.
Gets the textual representation of the zone, such as 'British Time' or '+02:00'.
Normalizes the time-zone ID, returning a
ZoneOffsetwhere possible.Obtains an instance of
ZoneIdusing its ID using a map of aliases to supplement the standard zone IDs.Obtains an instance of
ZoneIdwrapping an offset.Gets the system default time-zone.
Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Field Details
-
UTC
-
MIN
-
MAX
-
-
Method Details
-
of
-
ofHours
-
ofHoursMinutes
-
ofHoursMinutesSeconds
-
from
-
ofTotalSeconds
-
getTotalSeconds
-
getId
-
getRules
-
isSupported
-
range
-
get
-
getLong
-
query
-
adjustInto
-
compareTo
-
equals
-
hashCode
-
toString
-