Package com.e1c.langtool.stat
Interface IExporterRegistry
- All Known Implementing Classes:
ExporterRegistry
public interface IExporterRegistry
Defines the contract for a registry that manages associations between export formats and their corresponding
exporters. This interface allows for the registration of different exporters based on the
ExportFormat,
and for retrieving an exporter given a specific format. Implementing this interface facilitates the support
of multiple types of export operations, enabling dynamic handling of various export requirements.-
Method Summary
Modifier and TypeMethodDescriptiongetExporter(ExportFormat format) Retrieves anIStatisticsExporterassociated with the specifiedExportFormat.voidregisterExporter(ExportFormat format, IStatisticsExporter exporter) Registers anIStatisticsExporterto be associated with a specificExportFormat.
-
Method Details
-
registerExporter
Registers anIStatisticsExporterto be associated with a specificExportFormat. Implementations should ensure that the exporter is stored in such a way that it can be retrieved when required based on the format. If an exporter for a given format is already registered, the behavior (whether to replace the existing exporter or not) is left to the implementation.- Parameters:
format- The export format with which the exporter is to be associated. Must not benull.exporter- The exporter to be registered. Must not benull.
-
getExporter
Retrieves anIStatisticsExporterassociated with the specifiedExportFormat. Implementations should return the corresponding exporter if one is registered for the given format. If no exporter is registered for the specified format, the behavior (such as returningnullor throwing an exception) is left to the implementation.- Parameters:
format- The export format for which to retrieve the exporter. Must not benull.- Returns:
- The exporter associated with the specified format, or
nullor throw an exception if no exporter is registered for that format.
-