Class FeatureKeyContextData
java.lang.Object
com.e1c.langtool.storage.properties.FeatureKeyContextData
- All Implemented Interfaces:
ContextTranslationData
The context data model of the file with
FeatureKey key and String value.
Allows to configure case-sensitive of the key segments and the value for all entries.
This implementation is thread-safe.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<FeatureKey,String> protected final booleanprotected final Map<FeatureKey,String> protected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionFeatureKeyContextData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment) Instantiates a new feature key context data.FeatureKeyContextData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment, Runnable changeNotification) Instantiates a new feature key context data. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets the top data object comment.getComment(ContextTranslationKey translationKey) Gets the comment of the context key.getTranslation(ContextTranslationKey translationKey) Gets the translation by the context key.removeTranslation(ContextTranslationKey translationKey) Removes the translation by the context key.voidsetComment(String comment) Sets the top object comment.setTranslation(ContextTranslationKey translationKey, String value, String comment) Sets the translation and comment for the context key.
-
Field Details
-
keyCaseSensitive
protected final boolean keyCaseSensitive -
valueCaseSensitive
protected final boolean valueCaseSensitive -
storage
-
comments
-
-
Constructor Details
-
FeatureKeyContextData
Instantiates a new feature key context data.- Parameters:
keyCaseSensitive- the key case sensitivevalueCaseSensitive- the value case sensitivecomment- the comment, can benull.
-
FeatureKeyContextData
public FeatureKeyContextData(boolean keyCaseSensitive, boolean valueCaseSensitive, String comment, Runnable changeNotification) Instantiates a new feature key context data.- Parameters:
keyCaseSensitive- the key case sensitivevalueCaseSensitive- the value case sensitivecomment- the comment, can benull.changeNotification- the change notification, can benull.
-
-
Method Details
-
getComment
Description copied from interface:ContextTranslationDataGets the top data object comment.- Specified by:
getCommentin interfaceContextTranslationData- Returns:
- the comment, can return
null.
-
setComment
Description copied from interface:ContextTranslationDataSets the top object comment.- Specified by:
setCommentin interfaceContextTranslationData- Parameters:
comment- the new comment, can benull.
-
setTranslation
Description copied from interface:ContextTranslationDataSets the translation and comment for the context key.- Specified by:
setTranslationin interfaceContextTranslationData- Parameters:
translationKey- the translation key, cannot benull.value- the value, can benull.comment- the comment, can benull.- Returns:
- the previous stored translation, or
nullif was absent.
-
getTranslation
Description copied from interface:ContextTranslationDataGets the translation by the context key.- Specified by:
getTranslationin interfaceContextTranslationData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the translation, can return
null.
-
getComment
Description copied from interface:ContextTranslationDataGets the comment of the context key.- Specified by:
getCommentin interfaceContextTranslationData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the comment, can return
null.
-
removeTranslation
Description copied from interface:ContextTranslationDataRemoves the translation by the context key.- Specified by:
removeTranslationin interfaceContextTranslationData- Parameters:
translationKey- the translation key, cannot benull.- Returns:
- the removed translation or
nullif data object had now any translation associated with the key.
-
fireChanged
protected void fireChanged()
-