Interface ILocaleStringFormatter
- All Known Subinterfaces:
ILocaleKStringFormatter
- All Known Implementing Classes:
References.Result
- Author:
- Christopher Mindus
Field Summary
FieldsMethod Summary
Modifier and TypeMethodDescriptionObject[]getFormatterParams(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets the parameters used to format the String.getFormatterString(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets the String used to format the locale string.default StringGets a formatted String with the appropriate parameters using the formatting described below.default StringgetMessageLocaleString(LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default StringgetMessageLocaleString(ILocaleString localeString) Gets a formatted String with the appropriate parameters using the formatting described below.default StringgetMessageLocaleString(ILocaleString localeString, LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default StringgetMessageLocaleString(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default StringgetMessageLocaleString(Locale locale) Gets a formatted String with the appropriate parameters using the formatting described below.
Field Details
EMPTY
Empty parameter array.
Method Details
getFormatterString
String getFormatterString(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets the String used to format the locale string.- Parameters:
localeString- The locale string instance, ornullto look it up from current thread or system.provider- The information provider ornullfor none.localeInfo- The Locale information, ornullto look it up from the current thread if needed.- Returns:
- The locale string to format with potential parameters.
getFormatterParams
Object[] getFormatterParams(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets the parameters used to format the String.- Parameters:
localeString- The locale string instance, ornullto look it up from current thread or system.provider- The information provider ornullfor none.localeInfo- The Locale information, ornullto look it up from the current thread if needed.- Returns:
- An array of parameters used to format the String. The return value can be set to
nullin which case an empty array is used for the formatter.
getMessageLocaleString
Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.The locale is looked up from the current thread if required.
- Returns:
- The formatted String.
- See Also:
Utitlities#format(String, Object...)
getMessageLocaleString
Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.- Parameters:
locale- The Locale, ornullto look it up for the current thread if needed.- Returns:
- The formatted String.
- See Also:
Utitlities#format(Locale, String, Object...)
getMessageLocaleString
Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.- Parameters:
localeString- The locale string instance, ornullfor current session.string- The string to format.params- The parameters.- Returns:
- The formatted String.
- See Also:
getMessageLocaleString
Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.- Parameters:
localeInfo- The Locale information, ornullto look it up from the current thread if needed.string- The string to format.params- The parameters, ornullfor none.- Returns:
- The formatted String.
- See Also:
getMessageLocaleString
Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.- Parameters:
localeInfo- The Locale information, ornullto look it up from the current thread if needed.string- The string to format.params- The parameters, ornullfor none.- Returns:
- The formatted String.
- See Also:
getMessageLocaleString
default String getMessageLocaleString(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.Formats a String using curly brackets
{}as parameter or{param_index}parameter whereparam_indexis an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)method using parameters in the form of%[flags][width]conversionor%[argument_index$][flags][width]conversion.Parameters referenced by
{[param_index]}are convertedtoString()using{@link Utilities#toString()}enable e.g. deep-to-String of e.g. Exceptions, Arrays, etc.. Parameters references e.g. using%swill not receive this "toString" conversion (unless they target the sameparam_index.The formatting string replaces
{}with%sand{param_index}with%param_index$s.- Parameters:
localeString- The locale string instance, ornullto look it up from current thread or system.provider- The information provider ornullfor none.localeInfo- The Locale information, ornullto look it up from the current thread if needed.- Returns:
- The formatted String.
- See Also: