Record Class Entry
java.lang.Object
java.lang.Record
org.openehealth.ipf.commons.map.Entry
- Record Components:
key- left side of the mapping, may benullfor a mapping that answers an absent inputvalue- right side of the mappingequivalence- correspondence between key and value, nevernull— defaults toEquivalence.EQUALkeyDisplay- human-readable name of the key in its code system, ornullvalueDisplay- human-readable name of the value in its code system, ornull
public record Entry(String key, String value, Equivalence equivalence, String keyDisplay, String valueDisplay)
extends Record
A single key/value-pair of a
Mapping, qualified by the Equivalence that
holds between the two, and optionally by the human-readable name of either side.
The two displays are informative: nothing looks a code up by its display, and no format
requires them. They exist so that a mapping read from a source that carries them - a FHIR
ConceptMap does, for both the source and the target code - keeps them. A caller
building a Coding from a translation has one to put in it.
Both key and value are Strings.
- Since:
- 6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theequivalencerecord component.final inthashCode()Returns a hash code value for this object.booleanbooleankey()Returns the value of thekeyrecord component.Returns the value of thekeyDisplayrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.Returns the value of thevalueDisplayrecord component.withDisplays(String keyDisplay, String valueDisplay)
-
Constructor Details
-
Entry
public Entry(String key, String value, Equivalence equivalence, String keyDisplay, String valueDisplay) Creates an instance of aEntryrecord class.- Parameters:
key- the value for thekeyrecord componentvalue- the value for thevaluerecord componentequivalence- the value for theequivalencerecord componentkeyDisplay- the value for thekeyDisplayrecord componentvalueDisplay- the value for thevalueDisplayrecord component
-
Entry
-
Entry
-
-
Method Details
-
isInvertible
public boolean isInvertible()- Returns:
- whether this entry may contribute to the reverse index of its mapping
-
isTranslation
public boolean isTranslation()- Returns:
- whether looking this entry's key up answers with its value
- See Also:
-
withDisplays
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
key
-
value
-
equivalence
Returns the value of theequivalencerecord component.- Returns:
- the value of the
equivalencerecord component
-
keyDisplay
Returns the value of thekeyDisplayrecord component.- Returns:
- the value of the
keyDisplayrecord component
-
valueDisplay
Returns the value of thevalueDisplayrecord component.- Returns:
- the value of the
valueDisplayrecord component
-