<commit_before>/*
 * -----------------------------------------------------------------------
 * Copyright © 2013-2014 <NAME>, <http://www.menodata.de/>
 * -----------------------------------------------------------------------
 * This file (ChronoExtension.java) is part of project Time4J.
 *
 * Time4J is free software: You can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * Time4J is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Time4J. If not, see <http://www.gnu.org/licenses/>.
 * -----------------------------------------------------------------------
 */

package net.time4j.engine;

import java.util.Locale;
import java.util.Set;


/**
 * <p>Definiert eine konfigurationsabh&auml;ngige Erweiterung der
 * chronologischen Elemente einer Chronologie. </p>
 *
 * @author  <NAME>
 */
public interface ChronoExtension {

    //~ Methoden ----------------------------------------------------------

    /**
     * <p>Liefert das Elementmodell zur angegebenen Konfiguration. </p>
     *
     * <p>Ein leeres Set als R&uuml;ckgabe signalisiert dem Aufrufer, da&szlig;
     * f&uuml;r die gegebene Konfiguration die Erweiterung nicht relevant
     * ist. </p>
     *
     * @param   locale          language and country setting
     * @param   attributes      configuration attributes
     * @return  extended element model
     */
    Set<ChronoElement<?>> getElements(
        Locale locale,
        AttributeQuery attributes
    );

    /**
     * <p>Aktualisiert bei Bedarf die angegebene Wertquelle, um die Werte von
     * Erweiterungselementen zu Werten von Standardelementen aufzul&ouml;sen.
     * </p>
     *
     * <p>Implementierungen d&uuml;rfen hier auch {@code null} als Pseudo-Wert
     * benutzen, um ein Element mittels {@code parsedValues.with(element, null)}
     * aus der Wertquelle zu l&ouml;schen. Zu beachten: Das Argument hat als
     * Ausnahmefall keine Chronologie. </p>
     *
     * @param   entity  any kind of map from chronological elements to
     *                  their values (note that the main use case of parsed
     *                  data has no chronology and allows the virtual value
     *                  {@code null} to be set as indication for removing
     *                  associated element)
     * @return  eventually changed argument
     * @see     ChronoEntity#with(ChronoElement, Object)
     *          ChronoEntity.with(ChronoElement, V)
     */
    <T extends ChronoEntity<T>> T resolve(T entity);

}<commit_msg>english translation of ChronoExtension<commit_after>/*
 * -----------------------------------------------------------------------
 * Copyright © 2013-2014 <NAME>, <http://www.menodata.de/>
 * -----------------------------------------------------------------------
 * This file (ChronoExtension.java) is part of project Time4J.
 *
 * Time4J is free software: You can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * Time4J is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Time4J. If not, see <http://www.gnu.org/licenses/>.
 * -----------------------------------------------------------------------
 */

package net.time4j.engine;

import java.util.Locale;
import java.util.Set;


/**
 * <p>Defines a configuration-dependent extension of the chronological
 * elements of a {@code Chronology}. </p>
 *
 * @author  <NAME>
 */
/*[deutsch]
 * <p>Definiert eine konfigurationsabh&auml;ngige Erweiterung der
 * chronologischen Elemente einer Chronologie. </p>
 *
 * @author  <NAME>
 */
public interface ChronoExtension {

    //~ Methoden ----------------------------------------------------------

    /**
     * <p>Returns the element set for given configuration. </p>
     *
     * <p>An empty {@code Set} indicates that this extension is not relevant
     * for the given configuration. </p>
     *
     * @param   locale          language and country setting
     * @param   attributes      configuration attributes
     * @return  extended element model
     */
    /*[deutsch]
     * <p>Liefert das Elementmodell zur angegebenen Konfiguration. </p>
     *
     * <p>Ein leeres {@code Set} als R&uuml;ckgabe signalisiert dem Aufrufer,
     * da&szlig; f&uuml;r die gegebene Konfiguration die Erweiterung nicht
     * relevant ist. </p>
     *
     * @param   locale          language and country setting
     * @param   attributes      configuration attributes
     * @return  extended element model
     */
    Set<ChronoElement<?>> getElements(
        Locale locale,
        AttributeQuery attributes
    );

    /**
     * <p>Updates the given value source if necessary in order to resolve
     * the values of extension elements to values of standard elements. </p>
     *
     * <p>Implementations are allowed to use {@code null} as pseudo-value
     * in order to delete an element from given source via the expression
     * {@code parsedValues.with(element, null)}. Note: The argument has
     * exceptionally no chronology. </p>
     *
     * @param   entity  any kind of map from chronological elements to
     *                  their values (note that the main use case of parsed
     *                  data has no chronology and allows the virtual value
     *                  {@code null} to be set as indication for removing
     *                  associated element)
     * @return  eventually changed argument
     * @see     ChronoEntity#with(ChronoElement, Object)
     *          ChronoEntity.with(ChronoElement, V)
     */
    /*[deutsch]
     * <p>Aktualisiert bei Bedarf die angegebene Wertquelle, um die Werte von
     * Erweiterungselementen zu Werten von Standardelementen aufzul&ouml;sen.
     * </p>
     *
     * <p>Implementierungen d&uuml;rfen hier auch {@code null} als Pseudo-Wert
     * benutzen, um ein Element mittels {@code parsedValues.with(element, null)}
     * aus der Wertquelle zu l&ouml;schen. Zu beachten: Das Argument hat als
     * Ausnahmefall keine Chronologie. </p>
     *
     * @param   entity  any kind of map from chronological elements to
     *                  their values (note that the main use case of parsed
     *                  data has no chronology and allows the virtual value
     *                  {@code null} to be set as indication for removing
     *                  associated element)
     * @return  eventually changed argument
     * @see     ChronoEntity#with(ChronoElement, Object)
     *          ChronoEntity.with(ChronoElement, V)
     */
    <T extends ChronoEntity<T>> T resolve(T entity);

}
{'fraction_non_alphanumeric': 0.1504136715041367, 'fraction_numerical': 0.004068900040689, 'mean_word_length': 2.029580936729663, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6099163', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1945, 'n_words': 731}