Package net.time4j.tz
Enum Class GapResolver
- All Implemented Interfaces:
Serializable
,Comparable<GapResolver>
,java.lang.constant.Constable
Represents the component of a transition strategy how to handle gaps on the local timeline.
- Since:
- 2.2
- Author:
- Meno Hochschild
- See Also:
OverlapResolver
,TransitionStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionStrict strategy which rejects an invalid local time by throwing an exception.Alternative strategy which moves an invalid local time forward to the first valid time after transition.Default strategy which moves an invalid local time by the length of the gap into the future. -
Method Summary
Modifier and TypeMethodDescriptionand(OverlapResolver overlapResolver)
Yields a transition strategy as combination of given overlap resolver and this instance.static GapResolver
Returns the enum constant of this class with the specified name.static GapResolver[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
PUSH_FORWARD
Default strategy which moves an invalid local time by the length of the gap into the future.
Example for the switch to summer time in the timezone "Europe/Berlin":
2015-03-29T02:30+01:00 => 2015-03-29T03:30+02:00
-
NEXT_VALID_TIME
Alternative strategy which moves an invalid local time forward to the first valid time after transition.
Example for the switch to summer time in the timezone "Europe/Berlin":
2015-03-29T02:30+01:00 => 2015-03-29T03:00+02:00
-
ABORT
Strict strategy which rejects an invalid local time by throwing an exception.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
and
Yields a transition strategy as combination of given overlap resolver and this instance.
- Parameters:
overlapResolver
- strategy how to handle overlaps on the local timeline- Returns:
- transition strategy for handling gaps and overlaps
- Since:
- 2.2
-