Class MathIllegalArgumentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- org.apache.commons.math.exception.MathIllegalArgumentException
-
- All Implemented Interfaces:
Serializable,MathThrowable
- Direct Known Subclasses:
MathIllegalNumberException,NullArgumentException
public class MathIllegalArgumentException extends IllegalArgumentException implements MathThrowable
Base class for all preconditions violation exceptions. This class is not intended to be instantiated directly: it should serve as a base class to create all the exceptions that share the semantics of the standardIllegalArgumentException, but must also provide a localized message.- Since:
- 2.2
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()Gets the arguments used to build the message of this throwable.LocalizablegetGeneralPattern()Gets the localizable pattern used to build the general part of the message of this throwable.StringgetLocalizedMessage()Gets the message in the system default locale.StringgetMessage()Gets the message in a conventional US locale.StringgetMessage(Locale locale)Get the message in a specified locale.LocalizablegetSpecificPattern()Gets the localizable pattern used to build the specific part of the message of this throwable.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getSpecificPattern
public Localizable getSpecificPattern()
Gets the localizable pattern used to build the specific part of the message of this throwable.- Specified by:
getSpecificPatternin interfaceMathThrowable- Returns:
- localizable pattern used to build the specific part of the message of this throwable
-
getGeneralPattern
public Localizable getGeneralPattern()
Gets the localizable pattern used to build the general part of the message of this throwable.- Specified by:
getGeneralPatternin interfaceMathThrowable- Returns:
- localizable pattern used to build the general part of the message of this throwable
-
getArguments
public Object[] getArguments()
Gets the arguments used to build the message of this throwable.- Specified by:
getArgumentsin interfaceMathThrowable- Returns:
- the arguments used to build the message of this throwable
-
getMessage
public String getMessage(Locale locale)
Get the message in a specified locale.- Specified by:
getMessagein interfaceMathThrowable- Parameters:
locale- Locale in which the message should be translated.- Returns:
- the localized message.
-
getMessage
public String getMessage()
Gets the message in a conventional US locale.- Specified by:
getMessagein interfaceMathThrowable- Overrides:
getMessagein classThrowable- Returns:
- localized message
-
getLocalizedMessage
public String getLocalizedMessage()
Gets the message in the system default locale.- Specified by:
getLocalizedMessagein interfaceMathThrowable- Overrides:
getLocalizedMessagein classThrowable- Returns:
- localized message
-
-