Class ZoneRulesBuilder.TZRule

java.lang.Object
org.threeten.bp.zone.ZoneRulesBuilder.TZRule
All Implemented Interfaces:
Comparable<ZoneRulesBuilder.TZRule>
Enclosing class:
ZoneRulesBuilder

class ZoneRulesBuilder.TZRule extends Object implements Comparable<ZoneRulesBuilder.TZRule>
A definition of the way a local time can be converted to an offset time.
  • Field Details

    • year

      private int year
      The year.
    • month

      private Month month
      The month.
    • dayOfMonthIndicator

      private int dayOfMonthIndicator
      The day-of-month.
    • dayOfWeek

      private DayOfWeek dayOfWeek
      The day-of-month.
    • time

      private LocalTime time
      The local time.
    • adjustDays

      private int adjustDays
      The local time days adjustment.
    • timeDefinition

      The type of the time.
    • savingAmountSecs

      private int savingAmountSecs
      The amount of the saving to be applied after this point.
  • Constructor Details

    • TZRule

      TZRule(int year, Month month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, int adjustDays, ZoneOffsetTransitionRule.TimeDefinition timeDefinition, int savingAfterSecs)
      Constructor.
      Parameters:
      year - the year
      month - the month, not null
      dayOfMonthIndicator - the day-of-month of the transition, adjusted by dayOfWeek, from 1 to 31 adjusted later, or -1 to -28 adjusted earlier from the last day of the month
      dayOfWeek - the day-of-week, null if day-of-month is exact
      time - the time, not null
      adjustDays - the time day adjustment
      timeDefinition - the time definition, not null
      savingAfterSecs - the savings amount in seconds
  • Method Details

    • toTransition

      ZoneOffsetTransition toTransition(ZoneOffset standardOffset, int savingsBeforeSecs)
      Converts this to a transition.
      Parameters:
      standardOffset - the active standard offset, not null
      savingsBeforeSecs - the active savings in seconds
      Returns:
      the transition, not null
    • toTransitionRule

      ZoneOffsetTransitionRule toTransitionRule(ZoneOffset standardOffset, int savingsBeforeSecs)
      Converts this to a transition rule.
      Parameters:
      standardOffset - the active standard offset, not null
      savingsBeforeSecs - the active savings before the transition in seconds
      Returns:
      the transition, not null
    • compareTo

      public int compareTo(ZoneRulesBuilder.TZRule other)
      Specified by:
      compareTo in interface Comparable<ZoneRulesBuilder.TZRule>
    • toLocalDate

      private LocalDate toLocalDate()