Interface DictionaryData
- All Known Implementing Classes:
RegExDictionaryData,StringDictionaryData
public interface DictionaryData
The Interface for common data object that allows to get translations by
dictionary key.-
Method Summary
Modifier and TypeMethodDescriptionGets the comment.getComment(TranslationKey translationKey) Gets the comment for the translation key.getTranslation(TranslationKey translationKey) Gets the translation by the translation key.booleanhasKeyForValue(String value, TranslationKey skipKey) Checks if there is a key for the translation value.removeTranslation(TranslationKey translationKey) Removes the translation by the key.voidsetComment(String comment) Sets top data object comment.setTranslation(TranslationKey translationKey, String value, String comment) Sets the translation and comment for the translation key.
-
Method Details
-
setComment
Sets top data object comment.- Parameters:
comment- the new comment, can benull.
-
getComment
String getComment()Gets the comment.- Returns:
- the comment, can return
null.
-
removeTranslation
Removes the translation by the key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
nullif was no any translation.
-
getComment
Gets the comment for the translation key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the comment, can return
null.
-
getTranslation
Gets the translation by the translation key.- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
null.
-
setTranslation
Sets the translation and comment for the translation key.- Parameters:
translationKey- the translation key, cannot benull.value- the value, can benull.comment- the comment, can benull.- Returns:
- the previous translation, can return
nullif was no translation before.
-
hasKeyForValue
Checks if there is a key for the translation value.- Parameters:
value- the translation value, cannot benull.skipKey- the key which should be ignored if translation value found for this key, may benullif need to check all keys.- Returns:
- true, if data object has translation value
-