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 ConstantHasErrorText
createOnDemand
(String sErrorText) boolean
getDisplayText
(Locale aContentLocale) int
hashCode()
boolean
toString()
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
-
Constructor Details
-
ConstantHasErrorText
-
-
Method Details
-
getDisplayText
- Specified by:
getDisplayText
in 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
null
if the text could not be resolved in the passed locale.
-
isMultiLingual
public boolean isMultiLingual()- Specified by:
isMultiLingual
in interfaceIHasErrorText
- Returns:
true
if the error text is multilingual,false
otherwise.
-
equals
-
hashCode
public int hashCode() -
toString
-
createOnDemand
-