Package com.helger.commons.text
Interface IMutableMultilingualText
- All Superinterfaces:
IClearable,IHasText,IHasTextWithArgs,IMultilingualText
- All Known Implementing Classes:
AbstractMapBasedMultilingualText,MultilingualText
Interface for a writable version of a multilingual text
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionAdd a text in the specified locale.assignFrom(IMultilingualText aMLT) Assign all fields from the passed object.removeText(Locale aContentLocale) Remove the text with the specified locale.Set a text in the specified locale.Methods inherited from interface com.helger.commons.state.IClearable
removeAllMethods inherited from interface com.helger.commons.text.IHasText
getAsHasDisplayText, getTextMethods inherited from interface com.helger.commons.text.IHasTextWithArgs
getAsHasDisplayTextWithArgs, getTextWithArgs, getTextWithArgsMethods inherited from interface com.helger.commons.text.IMultilingualText
containsLocaleWithFallback, texts
-
Method Details
-
addText
Add a text in the specified locale. If a text with the same locale is already present,falseis returned.- Parameters:
aContentLocale- The locale in which the text should be set. May not benull.sText- The text to be set. May benull.- Returns:
EChange.CHANGEDif the text was added,EChange.UNCHANGEDotherwise.
-
setText
Set a text in the specified locale. If a text with the same locale is already present, the old value is overwritten.- Parameters:
aContentLocale- The locale in which the text should be set. May not benull.sText- The text to be set. May benull.- Returns:
EChange.CHANGEDif the text was set,EChange.UNCHANGEDotherwise.
-
removeText
Remove the text with the specified locale.- Parameters:
aContentLocale- The locale to be removed. May not benull.- Returns:
EChange.CHANGEDif the text was remove,EChange.UNCHANGEDotherwise.
-
assignFrom
Assign all fields from the passed object. All existing texts are removed!- Parameters:
aMLT- The object to read the content from. May not benull.- Returns:
EChange.CHANGEDif the assignment changed anything,EChange.UNCHANGEDotherwise.
-
changeNotifyCallbacks
@Nonnull @ReturnsMutableObject("Design") CallbackList<IChangeCallback<IMutableMultilingualText>> changeNotifyCallbacks()- Returns:
- The change notify callbacks. Never
null.
-