public enum GapResolver extends java.lang.Enum<GapResolver>
Represents the component of a transition strategy how to handle gaps on the local timeline.
OverlapResolver,
TransitionStrategy| Enum Constant and Description |
|---|
ABORT
Strict strategy which rejects an invalid local time by throwing
an exception.
|
NEXT_VALID_TIME
Alternative strategy which moves an invalid local time forward
to the first valid time after transition.
|
PUSH_FORWARD
Default strategy which moves an invalid local time by the length
of the gap into the future.
|
| Modifier and Type | Method and Description |
|---|---|
TransitionStrategy |
and(OverlapResolver overlapResolver)
Yields a transition strategy as combination of given overlap resolver
and this instance.
|
static GapResolver |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GapResolver[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GapResolver 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
public static final GapResolver 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
public static final GapResolver ABORT
Strict strategy which rejects an invalid local time by throwing an exception.
public static GapResolver[] values()
for (GapResolver c : GapResolver.values()) System.out.println(c);
public static GapResolver valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic TransitionStrategy and(OverlapResolver overlapResolver)
Yields a transition strategy as combination of given overlap resolver and this instance.
overlapResolver - strategy how to handle overlaps on the
local timeline