T - generic type of time contextpublic static class Chronology.Builder<T extends ChronoEntity<T>> extends Object
Builder for creating a new chronology without any time axis.
This class will be used during loading of a ChronoEntity-class
T in a static initializer.
| Modifier and Type | Method and Description |
|---|---|
<V> Chronology.Builder<T> |
appendElement(ChronoElement<V> element,
ElementRule<T,V> rule)
Registers a new element together with its associated
element rule.
|
Chronology.Builder<T> |
appendExtension(ChronoExtension extension)
Registers a state extension which can create models with their
own state separated from standard time value context.
|
Chronology<T> |
build()
Finishes the build of a new chronology.
|
static <T extends ChronoEntity<T>> |
setUp(Class<T> chronoType,
ChronoMerger<T> chronoMerger)
Creates a builder for building a new chronological system.
|
public static <T extends ChronoEntity<T>> Chronology.Builder<T> setUp(Class<T> chronoType, ChronoMerger<T> chronoMerger)
Creates a builder for building a new chronological system.
T - generic type of time contextchronoType - chronological typechronoMerger - creates a new instance of T from another
source (clock or parsed values)Builder objectUnsupportedOperationException - if T represents a subclass
of TimePointpublic <V> Chronology.Builder<T> appendElement(ChronoElement<V> element, ElementRule<T,V> rule)
Registers a new element together with its associated element rule.
V - generic type of element valueelement - chronological element to be registeredrule - rule associated with the elementIllegalArgumentException - if given element is already
registered (duplicate)public Chronology.Builder<T> appendExtension(ChronoExtension extension)
Registers a state extension which can create models with their own state separated from standard time value context.
extension - chronological extensionpublic Chronology<T> build()
Finishes the build of a new chronology.
Internally the new chronology will be weakly registered for
lookup(). Therefore it is strongly recommended to
reference the created chronology in a static constant within
the chronological type in question.
IllegalStateException - if already registeredChronology.lookup(Class)Copyright © 2014–2017. All rights reserved.