Package com.helger.commons.text
Class ConstantHasText
- java.lang.Object
-
- com.helger.commons.text.AbstractHasText
-
- com.helger.commons.text.ConstantHasText
-
- All Implemented Interfaces:
IHasText
@Immutable @MustImplementEqualsAndHashcode public class ConstantHasText extends AbstractHasText
An implementation of theIHasTextinterface that always returns a constant string. Use this only for texts that never need to be translated!- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description ConstantHasText(String sFixedText)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()protected StringinternalGetText(Locale aContentLocale)Main text resolving.StringtoString()-
Methods inherited from class com.helger.commons.text.AbstractHasText
getText, internalGetLocaleToUseWithFallback
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.text.IHasText
getAsHasDisplayText
-
-
-
-
Method Detail
-
internalGetText
@Nullable protected String internalGetText(@Nonnull Locale aContentLocale)
Description copied from class:AbstractHasTextMain text resolving. Get the text in the passed locale.- Specified by:
internalGetTextin classAbstractHasText- Parameters:
aContentLocale- Locale to use. This is the locale resolved internally. Nevernull.- Returns:
nullif no such text present in the passed locale
-
-