Class ZoneRulesBuilder.TZRule
java.lang.Object
javax.time.calendar.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 day-of-month.private DayOfWeekThe day-of-month.private MonthOfYearThe month.private PeriodThe amount of the saving to be applied after this point.private LocalTimeThe local time.private ZoneRulesBuilder.TimeDefinitionThe type of the time.private booleanWhether the local time is end of day.private intThe year. -
Constructor Summary
ConstructorsConstructorDescriptionTZRule(int year, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAfter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ZoneRulesBuilder.TZRule other) .(package private) ZoneOffsetTransitiontoTransition(ZoneOffset standardOffset, Period savingsBefore) Converts this to a transition.(package private) ZoneOffsetTransitionRuletoTransitionRule(ZoneOffset standardOffset, Period savingsBefore) 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. -
timeEndOfDay
private boolean timeEndOfDayWhether the local time is end of day. -
timeDefinition
The type of the time. -
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 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 nulltimeEndOfDay- whether midnight is at the end of daytimeDefinition- the time definition, not nullsavingAfter- the savings amount, not null
-
-
Method Details
-
toTransition
Converts this to a transition.- Parameters:
standardOffset- the active standard offset, not nullsavingsBefore- the active savings, not null- Returns:
- the transition, never null
-
toTransitionRule
Converts this to a transition rule.- Parameters:
standardOffset- the active standard offset, not nullsavingsBefore- the active savings before the transition, not null- Returns:
- the transition, never null
-
compareTo
.- Specified by:
compareToin interfaceComparable<ZoneRulesBuilder.TZRule>
-