Compares this transition to another based on the transition instant.
Compares this transition to another based on the transition instant.
This compares the instants of each transition. The offsets are ignored, making this order inconsistent with equals.
the transition to compare to, not null
the comparator value, negative if less, positive if greater
Checks if this object equals another.
Checks if this object equals another.
The entire state of the object is compared.
the other object to compare to, null returns false
true if equal
Gets the local transition date-time, as would be expressed with the 'after' offset.
Gets the local transition date-time, as would be expressed with the 'after' offset.
This is the first date-time after the discontinuity, when the new offset applies.
The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.
the transition date-time expressed with the after offset, not null
Gets the local transition date-time, as would be expressed with the 'before' offset.
Gets the local transition date-time, as would be expressed with the 'before' offset.
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.
The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.
the transition date-time expressed with the before offset, not null
Gets the duration of the transition.
Gets the duration of the transition.
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.
the duration of the transition, positive for gaps, negative for overlaps
Gets the transition instant.
Gets the transition instant.
This is the instant of the discontinuity, which is defined as the first instant that the 'after' offset applies.
The methods #getInstant()
, #getDateTimeBefore()
and #getDateTimeAfter()
all represent the same instant.
the transition instant, not null
Gets the offset after the transition.
Gets the offset after the transition.
This is the offset in use on and after the instant of the transition.
the offset after the transition, not null
Gets the offset before the transition.
Gets the offset before the transition.
This is the offset in use before the instant of the transition.
the offset before the transition, not null
Returns a suitable hash code.
Returns a suitable hash code.
the hash code
Does this transition represent a gap in the local time-line.
Does this transition represent a gap in the local time-line.
Gaps occur where there are local date-times that simply do not not exist.
An example would be when the offset changes from +01:00
to +02:00
.
This might be described as 'the clocks will move forward one hour tonight at 1am'.
true if this transition is a gap, false if it is an overlap
Does this transition represent a gap in the local time-line.
Does this transition represent a gap in the local time-line.
Overlaps occur where there are local date-times that exist twice.
An example would be when the offset changes from +02:00
to +01:00
.
This might be described as 'the clocks will move back one hour tonight at 2am'.
true if this transition is an overlap, false if it is a gap
Checks if the specified offset is valid during this transition.
Checks if the specified offset is valid during this transition.
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.
the offset to check, null returns false
true if the offset is valid during the transition
Gets the transition instant as an epoch second.
Gets the transition instant as an epoch second.
the transition epoch second
Returns a string describing this object.
Returns a string describing this object.
a string for debugging, not null
Creates an instance defining a transition between two offsets.