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) booleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
nullnor empty-
-
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.
-
toString
-