Enum Class Equivalence
- All Implemented Interfaces:
Serializable, Comparable<Equivalence>, Constable
Entry.
The vocabulary and its direction are those of FHIR R4 ConceptMap
(element.target.equivalence): the relation is read from the value (the target) to the
key (the source). WIDER means that the value is the wider concept, as other is
wider than A (adoption). R4's subsumes and specializes fold onto
WIDER and NARROWER.
Its purpose here is to state which entries may be used to build the reverse index of a
Mapping: only entries that assert an EQUAL or EQUIVALENT
correspondence are invertible. A key whose value is WIDER does not become the
canonical inverse of that value, which is what makes reverse-direction collisions detectable
instead of silent.
- Since:
- 6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe key and the value are explicitly not equivalent.The key and the value are the same concept.The key and the value are different concepts with the same meaning.The key and the value overlap, but neither subsumes the other.The value is a narrower concept than the key.The value is a wider concept than the key. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanWhether an entry with this equivalence is a translation at all, i.e. whether looking up its key should answer with its value.static EquivalenceReturns the enum constant of this class with the specified name.static Equivalence[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUAL
The key and the value are the same concept. -
EQUIVALENT
The key and the value are different concepts with the same meaning. -
WIDER
The value is a wider concept than the key. -
NARROWER
The value is a narrower concept than the key. -
INEXACT
The key and the value overlap, but neither subsumes the other. -
DISJOINT
The key and the value are explicitly not equivalent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isInvertible
public boolean isInvertible()- Returns:
- whether an entry with this equivalence may contribute to the reverse index
-
isTranslation
public boolean isTranslation()Whether an entry with this equivalence is a translation at all, i.e. whether looking up its key should answer with its value. Everything butDISJOINTis: a value that is wider, narrower or only inexactly related to its key is still a translation of it, if an imprecise one.DISJOINTasserts the opposite - that the two are explicitly not equivalent - so answering with its value would state the reverse of what the mapping says.FHIR draws the same line: the
resultof a$translate"can only be true if at least one returned match has an equivalence which is not unmatched or disjoint".- Returns:
- whether a lookup of this entry's key answers with its value
-