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 ofIHasErrorTextthat encapsulates arguments to be put into the message.- Since:
- 8.5.2
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description DynamicHasErrorTextWithArgs(IHasDisplayText aParentText, Object... aArgs)DynamicHasErrorTextWithArgs(IHasText aParentText, Object... aArgs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getAllArgs()Get all arguments from the constructor.StringgetDisplayText(Locale aContentLocale)IHasTextgetParentText()booleanisMultiLingual()StringtoString()-
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
-
-
-
-
Method Detail
-
getAllArgs
@Nonnull @Nonempty @ReturnsMutableCopy public Object[] getAllArgs()
Get all arguments from the constructor.- Returns:
- a copy of all arguments. Neither
nullnor empty-
-
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.
-
-