Package com.helger.commons.text
Interface IMutableMultilingualText
-
- All Superinterfaces:
IClearable,IHasText,IHasTextWithArgs,IMultilingualText
- All Known Implementing Classes:
AbstractMapBasedMultilingualText,MultilingualText
public interface IMutableMultilingualText extends IMultilingualText, IClearable
Interface for a writable version of a multilingual text- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EChangeaddText(Locale aContentLocale, String sText)Add a text in the specified locale.EChangeassignFrom(IMultilingualText aMLT)Assign all fields from the passed object.CallbackList<IChangeCallback<IMutableMultilingualText>>changeNotifyCallbacks()EChangeremoveText(Locale aContentLocale)Remove the text with the specified locale.EChangesetText(Locale aContentLocale, String sText)Set a text in the specified locale.-
Methods inherited from interface com.helger.commons.state.IClearable
removeAll
-
Methods inherited from interface com.helger.commons.text.IHasText
getAsHasDisplayText, getText
-
Methods inherited from interface com.helger.commons.text.IHasTextWithArgs
getAsHasDisplayTextWithArgs, getTextWithArgs, getTextWithArgs
-
Methods inherited from interface com.helger.commons.text.IMultilingualText
containsLocaleWithFallback, texts
-
-
-
-
Method Detail
-
addText
@Nonnull EChange addText(@Nonnull Locale aContentLocale, @Nullable String sText)
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
@Nonnull EChange setText(@Nonnull Locale aContentLocale, @Nullable String sText)
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
@Nonnull EChange removeText(@Nonnull Locale aContentLocale)
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
@Nonnull EChange assignFrom(@Nonnull IMultilingualText aMLT)
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.
-
-