Class RegExDictionaryData

java.lang.Object
com.e1c.langtool.storage.regex.RegExDictionaryData
All Implemented Interfaces:
DictionaryData

public class RegExDictionaryData extends Object implements DictionaryData
  • Constructor Details

  • Method Details

    • getSettings

      public RegExSettings getSettings()
    • setSettings

      public void setSettings(RegExSettings settings)
    • setComment

      public void setComment(String comment)
      Description copied from interface: DictionaryData
      Sets top data object comment.
      Specified by:
      setComment in interface DictionaryData
      Parameters:
      comment - the new comment, can be null.
    • getComment

      public String getComment()
      Description copied from interface: DictionaryData
      Gets the comment.
      Specified by:
      getComment in interface DictionaryData
      Returns:
      the comment, can return null.
    • removeTranslation

      public String removeTranslation(TranslationKey translationKey)
      Description copied from interface: DictionaryData
      Removes the translation by the key.
      Specified by:
      removeTranslation in interface DictionaryData
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the translation, can return null if was no any translation.
    • getComment

      public String getComment(TranslationKey translationKey)
      Description copied from interface: DictionaryData
      Gets the comment for the translation key.
      Specified by:
      getComment in interface DictionaryData
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the comment, can return null.
    • getTranslation

      public String getTranslation(TranslationKey translationKey)
      Description copied from interface: DictionaryData
      Gets the translation by the translation key.
      Specified by:
      getTranslation in interface DictionaryData
      Parameters:
      translationKey - the translation key, cannot be null.
      Returns:
      the translation, can return null.
    • setTranslation

      public String setTranslation(TranslationKey translationKey, String value, String comment)
      Description copied from interface: DictionaryData
      Sets the translation and comment for the translation key.
      Specified by:
      setTranslation in interface DictionaryData
      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

      public boolean hasKeyForValue(String value, TranslationKey skipKey)
      Description copied from interface: DictionaryData
      Checks if there is a key for the translation value.
      Specified by:
      hasKeyForValue in interface DictionaryData
      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