Interface Mapping

All Known Implementing Classes:
CompositeMapping, SimpleMapping

public sealed interface Mapping permits SimpleMapping, CompositeMapping
A named translation from one code system into another, as Mappings serves it and a MappingLoader produces it. A lookup by name works the same for either kind:
  • a SimpleMapping is a translation table - entries of its own and a fallback for either direction. Every mapping format reads into one and writes one;
  • a CompositeMapping holds no entries but the names of simple mappings, its parts, and answers through them. Loaders create one where a source spreads a single translation over several tables, such as the groups of a FHIR ConceptMap.
Both kinds answer every accessor declared here, so a caller inspecting a mapping need not know its kind in advance. What only a table has - entries(), the fallbacks and reversible() - a composite cannot report, since it holds nothing but the names of its parts; it throws UnsupportedOperationException for these. To inspect what a mapping of either kind declares, ask Mappings.entries(String) by name, which resolves the parts.
Since:
6.0