Package org.threeten.bp.zone
Class ZoneRulesBuilder.TZRule
- java.lang.Object
-
- org.threeten.bp.zone.ZoneRulesBuilder.TZRule
-
- All Implemented Interfaces:
java.lang.Comparable<ZoneRulesBuilder.TZRule>
- Enclosing class:
- ZoneRulesBuilder
class ZoneRulesBuilder.TZRule extends java.lang.Object implements java.lang.Comparable<ZoneRulesBuilder.TZRule>
A definition of the way a local time can be converted to an offset time.
-
-
Field Summary
Fields Modifier and Type Field Description private intadjustDaysThe local time days adjustment.private intdayOfMonthIndicatorThe day-of-month.private DayOfWeekdayOfWeekThe day-of-month.private MonthmonthThe month.private intsavingAmountSecsThe amount of the saving to be applied after this point.private LocalTimetimeThe local time.private ZoneOffsetTransitionRule.TimeDefinitiontimeDefinitionThe type of the time.private intyearThe year.
-
Constructor Summary
Constructors Constructor Description TZRule(int year, Month month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, int adjustDays, ZoneOffsetTransitionRule.TimeDefinition timeDefinition, int savingAfterSecs)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ZoneRulesBuilder.TZRule other)private LocalDatetoLocalDate()(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 Detail
-
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
private ZoneOffsetTransitionRule.TimeDefinition timeDefinition
The type of the time.
-
savingAmountSecs
private int savingAmountSecs
The amount of the saving to be applied after this point.
-
-
Constructor Detail
-
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 Detail
-
toTransition
ZoneOffsetTransition toTransition(ZoneOffset standardOffset, int savingsBeforeSecs)
Converts this to a transition.- Parameters:
standardOffset- the active standard offset, not nullsavingsBeforeSecs- 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 nullsavingsBeforeSecs- the active savings before the transition in seconds- Returns:
- the transition, not null
-
compareTo
public int compareTo(ZoneRulesBuilder.TZRule other)
- Specified by:
compareToin interfacejava.lang.Comparable<ZoneRulesBuilder.TZRule>
-
toLocalDate
private LocalDate toLocalDate()
-
-