@NotThreadSafe public abstract class AbstractMapBasedMultilingualText extends AbstractReadOnlyMapBasedMultilingualText implements IMutableMultilingualText
Map based implementation of IMultilingualText that does
also provide writing methods to the outside and is only to be used as a
non-abstract base class.| Modifier | Constructor and Description |
|---|---|
|
AbstractMapBasedMultilingualText() |
protected |
AbstractMapBasedMultilingualText(Map<Locale,String> aMapToUse)
Protected constructor that specifies the underlying
Map to use. |
| Modifier and Type | Method and Description |
|---|---|
EChange |
addText(Locale aContentLocale,
String sText)
Add a text in the specified locale.
|
EChange |
assignFrom(IMultilingualText aMLT)
Assign all fields from the passed object.
|
EChange |
clear()
Reset the contents of the element to the after-construction state.
|
CallbackList<IChangeCallback<IMutableMultilingualText>> |
getChangeNotifyCallbacks() |
EChange |
removeText(Locale aContentLocale)
Remove the text with the specified locale.
|
EChange |
setText(Locale aContentLocale,
String sText)
Set a text in the specified locale.
|
containsLocale, containsLocaleWithFallback, equals, getAllLocales, getAllTexts, getLocaleCount, getSize, hashCode, internalAddText, internalAddText, internalClear, internalGetAllLocales, internalGetLocaleToUseWithFallback, internalGetMap, internalGetText, internalRemoveText, internalSetText, isEmpty, isPerformConsistencyChecks, setPerformConsistencyChecks, toStringgetTextWithArgs, getTextWithArgsgetTextclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAllTextsgetTextWithArgs, getTextWithArgscontainsLocale, containsLocaleWithFallback, getAllLocales, getLocaleCountpublic AbstractMapBasedMultilingualText()
protected AbstractMapBasedMultilingualText(@Nonnull Map<Locale,String> aMapToUse)
Map to use. Use
this constructor to e.g. provide a concurrent HashMap or similar.aMapToUse - The map to use. Must not be null and must be writable.@Nonnull public final EChange addText(@Nonnull Locale aContentLocale, @Nullable String sText)
IMutableMultilingualTextfalse is returned.addText in interface IMutableMultilingualTextaContentLocale - The locale in which the text should be set. May not be
null.sText - The text to be set. May be null.EChange.CHANGED if the text was added,
EChange.UNCHANGED otherwise.@Nonnull public final EChange setText(@Nonnull Locale aContentLocale, @Nullable String sText)
IMutableMultilingualTextsetText in interface IMutableMultilingualTextaContentLocale - The locale in which the text should be set. May not be
null .sText - The text to be set. May be null.EChange.CHANGED if the text was set,
EChange.UNCHANGED otherwise.@Nonnull public final EChange removeText(@Nonnull Locale aContentLocale)
IMutableMultilingualTextremoveText in interface IMutableMultilingualTextaContentLocale - The locale to be removed. May not be null.EChange.CHANGED if the text was remove,
EChange.UNCHANGED otherwise.@Nonnull public final EChange clear()
IClearableclear in interface IClearableEChange.CHANGED if at least one element was cleared,
EChange.UNCHANGED otherwise.@Nonnull public final EChange assignFrom(@Nonnull IMultilingualText aMLT)
IMutableMultilingualTextassignFrom in interface IMutableMultilingualTextaMLT - The object to read the content from. May not be null.EChange.CHANGED if the assignment changed anything,
EChange.UNCHANGED otherwise.@Nonnull @ReturnsMutableObject(value="design") public final CallbackList<IChangeCallback<IMutableMultilingualText>> getChangeNotifyCallbacks()
getChangeNotifyCallbacks in interface IMutableMultilingualTextnull.Copyright © 2014–2015 Philip Helger. All rights reserved.