Package org.threeten.bp.zone
Class ZoneRulesBuilder.TZRule
java.lang.Object
org.threeten.bp.zone.ZoneRulesBuilder.TZRule
- All Implemented Interfaces:
Comparable<ZoneRulesBuilder.TZRule>
- Enclosing class:
- ZoneRulesBuilder
A definition of the way a local time can be converted to an offset time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe local time days adjustment.private intThe day-of-month.private DayOfWeekThe day-of-month.private MonthThe month.private intThe amount of the saving to be applied after this point.private LocalTimeThe local time.The type of the time.private intThe year. -
Constructor Summary
ConstructorsConstructorDescriptionTZRule(int year, Month month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, int adjustDays, ZoneOffsetTransitionRule.TimeDefinition timeDefinition, int savingAfterSecs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ZoneRulesBuilder.TZRule other) private LocalDate(package private) ZoneOffsetTransitiontoTransition(ZoneOffset standardOffset, int savingsBeforeSecs) Converts this to a transition.(package private) ZoneOffsetTransitionRuletoTransitionRule(ZoneOffset standardOffset, int savingsBeforeSecs) Converts this to a transition rule.
-
Field Details
-
year
private int yearThe year. -
month
The month. -
dayOfMonthIndicator
private int dayOfMonthIndicatorThe day-of-month. -
dayOfWeek
The day-of-month. -
time
The local time. -
adjustDays
private int adjustDaysThe local time days adjustment. -
timeDefinition
The type of the time. -
savingAmountSecs
private int savingAmountSecsThe 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 yearmonth- the month, not nulldayOfMonthIndicator- 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 monthdayOfWeek- the day-of-week, null if day-of-month is exacttime- the time, not nulladjustDays- the time day adjustmenttimeDefinition- the time definition, not nullsavingAfterSecs- the savings amount in seconds
-
-
Method Details
-
toTransition
Converts this to a transition.- Parameters:
standardOffset- the active standard offset, not nullsavingsBeforeSecs- the active savings in seconds- Returns:
- the transition, not null
-
toTransitionRule
Converts this to a transition rule.- Parameters:
standardOffset- the active standard offset, not nullsavingsBeforeSecs- the active savings before the transition in seconds- Returns:
- the transition, not null
-
compareTo
- Specified by:
compareToin interfaceComparable<ZoneRulesBuilder.TZRule>
-
toLocalDate
-