net.time4j.engine.CalendarProvider Maven / Gradle / Ivy
/*
* -----------------------------------------------------------------------
* Copyright © 2013-2017 Meno Hochschild,
* -----------------------------------------------------------------------
* This file (CalendarProvider.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 .
* -----------------------------------------------------------------------
*/
package net.time4j.engine;
import java.util.Optional;
/**
* SPI-interface for the generic access to calendar chronologies.
*
* @author Meno Hochschild
* @doctags.spec Implementations must have a public no-arg constructor.
* @see java.util.ServiceLoader
* @since 4.27
*/
/*[deutsch]
* SPI-Interface, das einen generischen Zugriff auf Kalenderchronologien ermöglicht.
*
* @author Meno Hochschild
* @doctags.spec Implementations must have a public no-arg constructor.
* @see java.util.ServiceLoader
* @since 4.27
*/
public interface CalendarProvider {
//~ Methoden ----------------------------------------------------------
/**
* Obtains a suitable chronology for given name.
*
* The calendar name is either a simple calendar type or a combination of a calendar type
* and a variant separated by a hyphen. Examples: "iso8601", "persian" or
* "islamic-tbla".
*
* @param name calendar name
* @return calendar chronology
*/
/*[deutsch]
* Liefert eine passende Chronologie zum angegebenen Namen.
*
* Der Kalendername ist entweder ein einfacher Kalendertyp oder eine Kombination des
* Kalendertyps mit einer Variante, getrennt durch Bindestrich. Beispiele: "iso8601",
* "persian" oder "islamic-tbla".
*
* @param name calendar name
* @return calendar chronology
*/
Optional> findChronology(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy