public class ConstantTextProvider extends AbstractTextProvider implements IHasDisplayText, IHasDisplayName, IHasName
ITextProvider
interface that always returns a constant string. Use this only for texts that
never need to be translated!IHasDisplayText, IHasDisplayName and IHasName are
only implemented, so that instances of this class can also be used as valid
substitutes for these interfaces.| Constructor and Description |
|---|
ConstantTextProvider(String sFixedText) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDisplayName() |
String |
getDisplayText(Locale aContentLocale) |
String |
getName() |
int |
hashCode() |
protected Locale |
internalGetLocaleToUseWithFallback(Locale aContentLocale)
Determine the locale to use.
|
protected String |
internalGetText(Locale aContentLocale)
Main text resolving
|
String |
toString() |
getTextWithArgs, getTextWithLocaleFallbackAndArgsgetText, getTextWithLocaleFallbackclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetText, getTextWithLocaleFallbackprotected Locale internalGetLocaleToUseWithFallback(@Nonnull Locale aContentLocale)
AbstractSimpleTextProviderinternalGetLocaleToUseWithFallback in class AbstractSimpleTextProvideraContentLocale - Requested localenull.@Nullable protected String internalGetText(@Nonnull Locale aContentLocale)
AbstractSimpleTextProviderinternalGetText in class AbstractSimpleTextProvideraContentLocale - locale to usenull if no such text present in the passed locale@Nonnull public String getDisplayText(@Nonnull Locale aContentLocale)
getDisplayText in interface IHasDisplayTextaContentLocale - The locale to be used for resolving. May not be null.null if the text could not be resolved in the passed
locale.@Nonnull public String getDisplayName()
getDisplayName in interface IHasDisplayNamenull.Copyright © 2006–2014 phloc systems. All rights reserved.