T - generic type of time context
(compatible to ChronoEntity)public interface ChronoMerger<T>
Merges any set of chronological informations to a new chronological entity.
This interface abstracts the knowledge of the chronology how to construct a new entity based on any set of chronological informations. It is mainly used by a parser in order to interprete textual representations of chronological entities.
Using this low-level-interface is usually reserved for Time4J and serves for internal format support. Implementation note: All classes of this type must be immutable.
| Modifier and Type | Method and Description |
|---|---|
T |
createFrom(ChronoEntity<?> entity,
AttributeQuery attributes,
boolean preparsing)
Konstruiert eine neue Entität basierend auf den angegebenen
chronologischen Daten.
|
T |
createFrom(TimeSource<?> clock,
AttributeQuery attributes)
Creates a new entity which reflects current time.
|
ChronoDisplay |
preformat(T context,
AttributeQuery attributes)
Transforms the current context/entity into another set of chronological
values which finally shall be formatted using given attributes.
|
Chronology<?> |
preparser()
This method defines a child chronology which can preparse
a chronological text.
|
T createFrom(TimeSource<?> clock, AttributeQuery attributes)
Creates a new entity which reflects current time.
In a date-only chronology this method will create the current date using the necessary timezone contained in given attributes.
clock - source for current timeattributes - configuration attributes which might contain
the timezone to translate current time to
local timenull if given data are insufficientT createFrom(ChronoEntity<?> entity, AttributeQuery attributes, boolean preparsing)
Konstruiert eine neue Entität basierend auf den angegebenen chronologischen Daten.
Typischerweise wird mit verschiedenen Prioritäten das Argument
entity nach Elementen abgefragt, die gruppenweise einen
Zeitwert konstruieren. Zum Beispiel kann ein Datum entweder über
die Epochentage, die Gruppe Jahr-Monat-Tag oder die Gruppe Jahr und Tag
des Jahres konstruiert werden.
Ein Textinterpretierer ruft diese Methode auf, nachdem ein Text elementweise in chronologische Elemente und Werte aufgelöst wurde.
entity - any chronological entity like parsed
elements with their valuesattributes - configuration attributes given by parserpreparsing - preparsing phase active?null if given data are insufficientIllegalArgumentException - in any case of inconsistent dataChronoDisplay preformat(T context, AttributeQuery attributes)
Transforms the current context/entity into another set of chronological values which finally shall be formatted using given attributes.
attributes - controls attributes during formattingIllegalArgumentException - in any case of inconsistent dataChronology<?> preparser()
This method defines a child chronology which can preparse a chronological text.
nullCopyright © 2014. All rights reserved.