Interface ILocaleStringFormatter
- All Known Subinterfaces:
ILocaleKStringFormatter
- All Known Implementing Classes:
References.Result
- Author:
- Christopher Mindus
Field Summary
Method 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 String
Gets a formatted String with the appropriate parameters using the formatting described below.default String
getMessageLocaleString
(LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default String
getMessageLocaleString
(ILocaleString localeString) Gets a formatted String with the appropriate parameters using the formatting described below.default String
getMessageLocaleString
(ILocaleString localeString, LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default String
getMessageLocaleString
(ILocaleString localeString, IKStringInfoProvider provider, LocaleInfo localeInfo) Gets a formatted String with the appropriate parameters using the formatting described below.default String
getMessageLocaleString
(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, ornull
to look it up from current thread or system.provider
- The information provider ornull
for none.localeInfo
- The Locale information, ornull
to 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, ornull
to look it up from current thread or system.provider
- The information provider ornull
for none.localeInfo
- The Locale information, ornull
to 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
null
in 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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{param_index}
with%param_index$s
.- Parameters:
locale
- The Locale, ornull
to 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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{param_index}
with%param_index$s
.- Parameters:
localeString
- The locale string instance, ornull
for 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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{param_index}
with%param_index$s
.- Parameters:
localeInfo
- The Locale information, ornull
to look it up from the current thread if needed.string
- The string to format.params
- The parameters, ornull
for 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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{param_index}
with%param_index$s
.- Parameters:
localeInfo
- The Locale information, ornull
to look it up from the current thread if needed.string
- The string to format.params
- The parameters, ornull
for 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_index
is an optional one-based index value, AND/OR the JavaString.format(Locale, String, Object...)
method using parameters in the form of%[flags][width]conversion
or%[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%s
will not receive this "toString" conversion (unless they target the sameparam_index
.The formatting string replaces
{}
with%s
and{param_index}
with%param_index$s
.- Parameters:
localeString
- The locale string instance, ornull
to look it up from current thread or system.provider
- The information provider ornull
for none.localeInfo
- The Locale information, ornull
to look it up from the current thread if needed.- Returns:
- The formatted String.
- See Also: