Package com.helger.commons.error.text
Class DynamicHasErrorTextWithArgs
java.lang.Object
com.helger.commons.error.text.DynamicHasErrorTextWithArgs
- All Implemented Interfaces:
IHasErrorText
,IHasDisplayText
@Immutable
@MustImplementEqualsAndHashcode
public class DynamicHasErrorTextWithArgs
extends Object
implements IHasErrorText
A special implementation of
IHasErrorText
that encapsulates arguments
to be put into the message.- Since:
- 8.5.2
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicHasErrorTextWithArgs
(IHasDisplayText aParentText, Object... aArgs) DynamicHasErrorTextWithArgs
(IHasText aParentText, Object... aArgs) -
Method Summary
Modifier and TypeMethodDescriptionObject[]
Get all arguments from the constructor.getDisplayText
(Locale aContentLocale) boolean
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.helger.commons.text.display.IHasDisplayText
getAsHasText
-
Constructor Details
-
DynamicHasErrorTextWithArgs
public DynamicHasErrorTextWithArgs(@Nonnull IHasDisplayText aParentText, @Nonnull @Nonempty Object... aArgs) -
DynamicHasErrorTextWithArgs
-
-
Method Details
-
getParentText
-
getAllArgs
Get all arguments from the constructor.- Returns:
- a copy of all arguments. Neither
null
nor empty-
-
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.
-
toString
-