Creates an instance defining a transition between two offsets.
Creates an instance from epoch-second and offsets.
Compares this transition to another based on the transition instant. !(p) This compares the instants of each transition. The offsets are ignored, making this order inconsistent with equals.
Gets the local transition date-time, as would be expressed with the 'after' offset. !(p) This is the first date-time after the discontinuity, when the new offset applies. !(p) The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.
Gets the local transition date-time, as would be expressed with the 'before' offset. !(p) This is the date-time where the discontinuity begins expressed with the 'before' offset. At this instant, the 'after' offset is actually used, therefore the combination of this date-time and the 'before' offset will never occur. !(p) The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.
Gets the duration of the transition. !(p) In most cases, the transition duration is one hour, however this is not always the case. The duration will be positive for a gap and negative for an overlap. Time-zones are second-based, so the nanosecond part of the duration will be zero.
Gets the transition instant. !(p) This is the instant of the discontinuity, which is defined as the first instant that the 'after' offset applies. !(p) The methods {@link #getInstant()}, {@link #getDateTimeBefore()} and {@link #getDateTimeAfter()} all represent the same instant.
Gets the offset after the transition. !(p) This is the offset _in use on and after the instant of the transition.
Gets the offset before the transition. !(p) This is the offset _in use before the instant of the transition.
Gets the valid offsets during this transition. !(p) A gap will return an empty list, while an overlap will return both offsets.
Does this transition represent a gap _in the local time-line. !(p) Gaps occur where there are local date-times that simply do not exist. An example would be when the offset changes from {@code +01:00} to {@code +02:00}. This might be described as 'the clocks will move forward one hour tonight at 1am'.
Does this transition represent an overlap _in the local time-line. !(p) Overlaps occur where there are local date-times that exist twice. An example would be when the offset changes from {@code +02:00} to {@code +01:00}. This might be described as 'the clocks will move back one hour tonight at 2am'.
Checks if the specified offset is valid during this transition. !(p) This checks to see if the given offset will be valid at some point _in the transition. A gap will always return false. An overlap will return true if the offset is either the before or after offset.
Checks if this object equals another. !(p) The entire state of the object is compared.
Gets the transition instant as an epoch second.
Returns a suitable hash code.
Returns a string describing this object.
Writes the state to the stream.
Obtains an instance defining a transition between two offsets. !(p) Applications should normally obtain an instance from {@link ZoneRules}. This factory is only intended for use when creating {@link ZoneRules}.
Reads the state from the stream.
A transition between two offsets caused by a discontinuity _in the local time-line. !(p) A transition between two offsets is normally the result of a daylight savings cutover. The discontinuity is normally a gap _in spring and an overlap _in autumn. {@code ZoneOffsetTransition} models the transition between the two offsets. !(p) Gaps occur where there are local date-times that simply do not exist. An example would be when the offset changes from {@code +03:00} to {@code +04:00}. This might be described as 'the clocks will move forward one hour tonight at 1am'. !(p) Overlaps occur where there are local date-times that exist twice. An example would be when the offset changes from {@code +04:00} to {@code +03:00}. This might be described as 'the clocks will move back one hour tonight at 2am'.
@implSpec This class is immutable and thread-safe.
@since 1.8