Package com.helger.commons.error.text
Class ConstantHasErrorText
- java.lang.Object
-
- com.helger.commons.error.text.ConstantHasErrorText
-
- All Implemented Interfaces:
IHasErrorText,IHasDisplayText
@Immutable @MustImplementEqualsAndHashcode public class ConstantHasErrorText extends Object implements IHasErrorText
A constant implementation ofIHasErrorText. Cannot be a lambda expression because equals/hashCode is required!- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description ConstantHasErrorText(String sText)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantHasErrorTextcreateOnDemand(String sErrorText)booleanequals(Object o)StringgetDisplayText(Locale aContentLocale)inthashCode()booleanisMultiLingual()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.text.display.IHasDisplayText
getAsHasText
-
-
-
-
Method Detail
-
getDisplayText
@Nullable public String getDisplayText(@Nonnull Locale aContentLocale)
- Specified by:
getDisplayTextin interfaceIHasDisplayText- Parameters:
aContentLocale- The locale to be used for resolving. May not benull.- Returns:
- The display text of the object in the given locale. May be
nullif the text could not be resolved in the passed locale.
-
isMultiLingual
public boolean isMultiLingual()
- Specified by:
isMultiLingualin interfaceIHasErrorText- Returns:
trueif the error text is multilingual,falseotherwise.
-
createOnDemand
@Nullable public static ConstantHasErrorText createOnDemand(@Nullable String sErrorText)
-
-