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 of
IHasErrorText. Cannot be a lambda
expression because equals/hashCode is required!- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConstantHasErrorTextcreateOnDemand(String sErrorText) booleangetDisplayText(Locale aContentLocale) inthashCode()booleantoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.text.display.IHasDisplayText
getAsHasText
-
Constructor Details
-
ConstantHasErrorText
-
-
Method Details
-
getDisplayText
- 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.
-
equals
-
hashCode
public int hashCode() -
toString
-
createOnDemand
-