Package net.time4j.tz.model
Class TransitionModel
java.lang.Object
net.time4j.tz.model.TransitionModel
- All Implemented Interfaces:
Serializable,TransitionHistory
Factory class for creating zonal transition histories.
- Since:
- 2.2
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method is only a performance indicator and determines if negative daylight savings exist at all in this model.booleanisEmpty()Determines if this history does not have any transitions.static TransitionHistoryof(List<ZonalTransition> transitions)Creates a new array-based and finite transition history.static TransitionHistoryof(ZonalOffset standardOffset, List<DaylightSavingRule> rules)Creates a new rule-based transition history.static TransitionHistoryof(ZonalOffset initialOffset, List<ZonalTransition> transitions, List<DaylightSavingRule> rules)Creates a transition history of both history transitions and rules for future transitions as well.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.time4j.tz.TransitionHistory
dump, findConflictTransition, findNextTransition, findPreviousTransition, findStartTransition, getConflictTransition, getInitialOffset, getStartTransition, getStdTransitions, getTransitions, getValidOffsets
-
Method Details
-
of
Creates a new array-based and finite transition history.
- Parameters:
transitions- list of zonal transitions- Returns:
- new transition history
- Throws:
IllegalArgumentException- in any case of inconsistencies or if there are no transitions at all- Since:
- 2.2
-
of
Creates a new rule-based transition history.
- Parameters:
standardOffset- standard offsetrules- list of daylight saving rules- Returns:
- new transition history
- Throws:
IllegalArgumentException- in any case of inconsistencies or if there are more than 127 rules- Since:
- 2.2
-
of
public static TransitionHistory of(ZonalOffset initialOffset, List<ZonalTransition> transitions, List<DaylightSavingRule> rules)Creates a transition history of both history transitions and rules for future transitions as well.
- Parameters:
initialOffset- initial offsettransitions- list of zonal transitionsrules- list of daylight saving rules- Returns:
- new transition history
- Throws:
IllegalArgumentException- in any case of inconsistencies or if there are more than 127 rules- Since:
- 2.2
-
isEmpty
public boolean isEmpty()Description copied from interface:TransitionHistoryDetermines if this history does not have any transitions.
- Specified by:
isEmptyin interfaceTransitionHistory- Returns:
trueif there are no transitions elsefalse
-
hasNegativeDST
public boolean hasNegativeDST()This method is only a performance indicator and determines if negative daylight savings exist at all in this model.
The standard implementation obtains the value
false.- Returns:
- boolean
- Since:
- 5.0
-