public interface IEnumTextResolver
| Modifier and Type | Method and Description |
|---|---|
String |
getText(Enum<?> aEnum,
IHasText aTP,
Locale aContentLocale)
Get the text of an enumeration item.
|
default String |
getTextWithArgs(Enum<?> aEnum,
IHasTextWithArgs aTP,
Locale aContentLocale)
Deprecated.
Use
getText(Enum, IHasText, Locale) instead when no
argument is needed |
default String |
getTextWithArgs(Enum<?> aEnum,
IHasTextWithArgs aTP,
Locale aContentLocale,
Object... aArgs)
Get the text of an enumeration item with placeholder texts being replaced.
|
@Nullable String getText(@Nonnull Enum<?> aEnum, @Nonnull IHasText aTP, @Nonnull Locale aContentLocale)
aEnum - The enumeration item to get the unique ID of. May not be
null.aTP - The text provider containing the text. May not be null.aContentLocale - The locale to be used. May not be null.null if no text could be resolved.@Nullable @Deprecated @DevelopersNote(value="Use getText instead when no argument is needed") default String getTextWithArgs(@Nonnull Enum<?> aEnum, @Nonnull IHasTextWithArgs aTP, @Nonnull Locale aContentLocale)
getText(Enum, IHasText, Locale) instead when no
argument is neededaEnum - The enumeration item to get the unique ID of. May not be
null.aTP - The text provider containing the text. May not be null.aContentLocale - The locale to be used. May not be null.null if no text could be resolved.@Nullable default String getTextWithArgs(@Nonnull Enum<?> aEnum, @Nonnull IHasTextWithArgs aTP, @Nonnull Locale aContentLocale, @Nullable Object... aArgs)
aEnum - The enumeration item to get the unique ID of. May not be
null.aTP - The text provider containing the text. May not be null.aContentLocale - The locale to be used. May not be null.aArgs - The arguments to be added into the string. May be null
but this makes no sense.null if no text could be resolved.Copyright © 2014–2019 Philip Helger. All rights reserved.