Class ParameterizedMultilingualText
java.lang.Object
com.aquima.interactions.foundation.text.ParameterizedMultilingualText
- All Implemented Interfaces:
IMultilingualText
,Serializable
Parameterized multilingual text.
It inserts parameters in the message output on the getValue.
A text containing:
'abc {0}{1}{2}' with new String[] { "a", "b", "c", "d" } => 'abc abc' 'abc {0}{1}{2}' with new String[] { "a", "b", "c" } => 'abc abc' 'abc {0}{1}{2}' with new String[] { "a", "b" } => 'abc ab{2}'
- Since:
- 5.0
- Author:
- F. van der Meer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParameterizedMultilingualText
(IMultilingualText delegateText, String[] parameters) Constructs the text object with the text and the parameters that should be used. -
Method Summary
-
Constructor Details
-
Method Details
-
getValue
-
getValue
-
getValue
Description copied from interface:IMultilingualText
Retrieves the text for the specified language code. If desired one can return a constant text independent of language code.- Specified by:
getValue
in interfaceIMultilingualText
- Parameters:
languageCode
- never null- Returns:
- The text, can return a null pointer.
-
getValue
Description copied from interface:IMultilingualText
Retrieves the text for the specified language code. If this text does not exist, the text of the fallback language code is being retrieved. If desired one can return a constant text independent of language code.- Specified by:
getValue
in interfaceIMultilingualText
- Parameters:
languageCode
- never nullfallbackLanguageCode
- never null- Returns:
- The text, can return a null pointer.
-
hashCode
public int hashCode() -
equals
-
getLanguageCodes
Description copied from interface:IMultilingualText
Retrieves the language codes.- Specified by:
getLanguageCodes
in interfaceIMultilingualText
- Returns:
- The text, can't return null.
-
getDefaultText
Description copied from interface:IMultilingualText
Returns the default text.- Specified by:
getDefaultText
in interfaceIMultilingualText
- Returns:
- The default text, can be null.
-