Class StringDictionaryData
java.lang.Object
com.e1c.langtool.storage.properties.StringDictionaryData
- All Implemented Interfaces:
DictionaryData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionStringDictionaryData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment) Instantiates a new string dictionary data.StringDictionaryData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment, Runnable changeNotification) Instantiates a new string dictionary data. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets 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.
-
Field Details
-
keyCaseSensitive
protected final boolean keyCaseSensitive -
valueCaseSensitive
protected final boolean valueCaseSensitive -
storage
-
comments
-
-
Constructor Details
-
StringDictionaryData
Instantiates a new string dictionary data.- Parameters:
keyCaseSensitive- the key case sensitivevalueCaseSensitive- the value case sensitivecomment- the comment, can benull.
-
StringDictionaryData
public StringDictionaryData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment, Runnable changeNotification) Instantiates a new string dictionary data.- Parameters:
keyCaseSensitive- the key case sensitivevalueCaseSensitive- the value case sensitivecomment- the comment, can be .changeNotification- the change notification, can be .
-
-
Method Details
-
getComment
Description copied from interface:DictionaryDataGets the comment.- Specified by:
getCommentin interfaceDictionaryData- Returns:
- the comment, can return
null.
-
setComment
Description copied from interface:DictionaryDataSets top data object comment.- Specified by:
setCommentin interfaceDictionaryData- Parameters:
comment- the new comment, can benull.
-
setTranslation
Description copied from interface:DictionaryDataSets the translation and comment for the translation key.- Specified by:
setTranslationin interfaceDictionaryData- 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.
-
getTranslation
Description copied from interface:DictionaryDataGets the translation by the translation key.- Specified by:
getTranslationin interfaceDictionaryData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
null.
-
getComment
Description copied from interface:DictionaryDataGets the comment for the translation key.- Specified by:
getCommentin interfaceDictionaryData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the comment, can return
null.
-
removeTranslation
Description copied from interface:DictionaryDataRemoves the translation by the key.- Specified by:
removeTranslationin interfaceDictionaryData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
nullif was no any translation.
-
hasKeyForValue
Description copied from interface:DictionaryDataChecks if there is a key for the translation value.- Specified by:
hasKeyForValuein interfaceDictionaryData- 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
-
fireChanged
protected void fireChanged()
-