Package javax.time.calendar.zone
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 int
The day-of-month.private DayOfWeek
The day-of-month.private MonthOfYear
The month.private Period
The amount of the saving to be applied after this point.private LocalTime
The local time.private ZoneRulesBuilder.TimeDefinition
The type of the time.private boolean
Whether the local time is end of day.private int
The 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 TypeMethodDescriptionint
compareTo
(ZoneRulesBuilder.TZRule other) .(package private) ZoneOffsetTransition
toTransition
(ZoneOffset standardOffset, Period savingsBefore) Converts this to a transition.(package private) ZoneOffsetTransitionRule
toTransitionRule
(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:
compareTo
in interfaceComparable<ZoneRulesBuilder.TZRule>
-