public abstract class AbstractSimpleTextProvider extends Object implements ISimpleTextProvider
ISimpleTextProvider that has
default implementations for the formatting things.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSimpleTextProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getText(Locale aContentLocale)
Get the text specific for the passed locale.
|
String |
getTextWithLocaleFallback(Locale aContentLocale)
Get the text specific for the passed locale.
|
protected abstract Locale |
internalGetLocaleToUseWithFallback(Locale aContentLocale)
Determine the locale to use.
|
protected abstract String |
internalGetText(Locale aContentLocale)
Main text resolving
|
@Nullable protected abstract String internalGetText(@Nonnull Locale aContentLocale)
aContentLocale - locale to usenull if no such text present in the passed locale@Nullable protected abstract Locale internalGetLocaleToUseWithFallback(@Nonnull Locale aContentLocale)
aContentLocale - Requested localenull.@Nullable public final String getText(@Nonnull Locale aContentLocale)
ISimpleTextProvidergetText in interface ISimpleTextProvideraContentLocale - The locale to use. May not be null.null if no text for the given locale was found.@Nullable public final String getTextWithLocaleFallback(@Nonnull Locale aContentLocale)
ISimpleTextProvidergetTextWithLocaleFallback in interface ISimpleTextProvideraContentLocale - The locale to use. May not be null.null if no text for the given locale was found.LocaleUtils.getCalculatedLocaleListForResolving(Locale)Copyright © 2006–2015 phloc systems. All rights reserved.