Package net.time4j.tz

Enum Class OverlapResolver

java.lang.Object
java.lang.Enum<OverlapResolver>
net.time4j.tz.OverlapResolver
All Implemented Interfaces:
Serializable, Comparable<OverlapResolver>, java.lang.constant.Constable

public enum OverlapResolver extends Enum<OverlapResolver>

Represents the component of a transition strategy how to handle overlaps on the local timeline.

Since:
2.2
Author:
Meno Hochschild
See Also:
GapResolver, TransitionStrategy
  • Enum Constant Details

    • EARLIER_OFFSET

      public static final OverlapResolver EARLIER_OFFSET

      Strategy which selects the earlier offset before a transition where the local time is ambivalent due to an overlap on the local timeline.

    • LATER_OFFSET

      public static final OverlapResolver LATER_OFFSET

      Default strategy which selects the later offset after a transition where the local time is ambivalent due to an overlap on the local timeline.

  • Method Details

    • values

      public static OverlapResolver[] 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

      public static OverlapResolver valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • and

      public TransitionStrategy and(GapResolver gapResolver)

      Yields a transition strategy as combination of given gap resolver and this instance.

      Parameters:
      gapResolver - strategy how to handle gaps on the local timeline
      Returns:
      transition strategy for handling gaps and overlaps
      Since:
      2.2
      See Also:
      GapResolver.and(OverlapResolver)