Class TranslationTable
java.lang.Object
org.sentrysoftware.metricshub.engine.connector.model.common.TranslationTable
- All Implemented Interfaces:
Serializable,ITranslationTable
Represents a translation table used for mapping values in the context of a connector.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a deep copy of theTranslationTableinstance.Retrieves the translations mapping.voidsetTranslation(String key, String value) Sets a translation for the specified key.voidupdate(UnaryOperator<String> updater) Updates the translation values using the specified updater.
-
Constructor Details
-
TranslationTable
public TranslationTable()
-
-
Method Details
-
copy
Creates a deep copy of theTranslationTableinstance.- Specified by:
copyin interfaceITranslationTable- Returns:
- A new instance of
TranslationTablewith copied translations.
-
update
Updates the translation values using the specified updater.- Specified by:
updatein interfaceITranslationTable- Parameters:
updater- An operation on a single operand that produces a result of the same type as its operand.
-
setTranslation
Sets a translation for the specified key.- Parameters:
key- The key for the translation.value- The translation value.
-
getTranslations
Retrieves the translations mapping.- Returns:
- The translations mapping.
-