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 Details

    • setComment

      void setComment(String comment)
      Sets top data object comment.
      Parameters:
      comment - the new comment, can be null.
    • getComment

      String getComment()
      Gets the comment.
      Returns:
      the comment, can return null.
    • removeTranslation

      String removeTranslation(TranslationKey translationKey)
      Removes the translation by the key.
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the translation, can return null if was no any translation.
    • getComment

      String getComment(TranslationKey translationKey)
      Gets the comment for the translation key.
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the comment, can return null.
    • getTranslation

      String getTranslation(TranslationKey translationKey)
      Gets the translation by the translation key.
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the translation, can return null.
    • setTranslation

      String setTranslation(TranslationKey translationKey, String value, String comment)
      Sets the translation and comment for the translation key.
      Parameters:
      translationKey - the translation key, cannot be null.
      value - the value, can be null.
      comment - the comment, can be null.
      Returns:
      the previous translation, can return null if was no translation before.
    • hasKeyForValue

      boolean hasKeyForValue(String value, TranslationKey skipKey)
      Checks if there is a key for the translation value.
      Parameters:
      value - the translation value, cannot be null.
      skipKey - the key which should be ignored if translation value found for this key, may be null if need to check all keys.
      Returns:
      true, if data object has translation value