Class ZoneRulesBuilder.TZRule

java.lang.Object
javax.time.calendar.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 MonthOfYear 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.
    • timeEndOfDay

      private boolean timeEndOfDay
      Whether the local time is end of day.
    • timeDefinition

      private ZoneRulesBuilder.TimeDefinition timeDefinition
      The type of the time.
    • savingAmount

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

    • TZRule

      TZRule(int year, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAfter)
      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
      timeEndOfDay - whether midnight is at the end of day
      timeDefinition - the time definition, not null
      savingAfter - the savings amount, not null
  • Method Details

    • toTransition

      ZoneOffsetTransition toTransition(ZoneOffset standardOffset, Period savingsBefore)
      Converts this to a transition.
      Parameters:
      standardOffset - the active standard offset, not null
      savingsBefore - the active savings, not null
      Returns:
      the transition, never null
    • toTransitionRule

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

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