Package javax.time.calendar.zone
Class ZoneRulesBuilder.TZRule
- java.lang.Object
-
- javax.time.calendar.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 int
dayOfMonthIndicator
The day-of-month.private DayOfWeek
dayOfWeek
The day-of-month.private MonthOfYear
month
The month.private Period
savingAmount
The amount of the saving to be applied after this point.private LocalTime
time
The local time.private ZoneRulesBuilder.TimeDefinition
timeDefinition
The type of the time.private boolean
timeEndOfDay
Whether the local time is end of day.private int
year
The year.
-
Constructor Summary
Constructors Constructor Description TZRule(int year, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAfter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
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 Detail
-
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 Detail
-
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 Detail
-
toTransition
ZoneOffsetTransition toTransition(ZoneOffset standardOffset, Period savingsBefore)
Converts this to a transition.- Parameters:
standardOffset
- the active standard offset, not nullsavingsBefore
- 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 nullsavingsBefore
- the active savings before the transition, not null- Returns:
- the transition, never null
-
compareTo
public int compareTo(ZoneRulesBuilder.TZRule other)
.- Specified by:
compareTo
in interfacejava.lang.Comparable<ZoneRulesBuilder.TZRule>
-
-