Class UnequalArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.AbstractInvalidArgumentException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.UnequalArgumentException
- All Implemented Interfaces:
Serializable
A
UnequalArgumentException is a
AbstractInvalidArgumentException that is supposed to be thrown when a
given argument does undesirably not equal a given value.- Author:
- Silvan Wyss
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic UnequalArgumentExceptionforArgumentAndArgumentNameAndValue(Object argument, String argumentName, Object value) static UnequalArgumentExceptionforArgumentAndValue(Object argument, Object value) Methods inherited from class AbstractInvalidArgumentException
getArgumentName, getErrorPredicate, getStoredArgumentMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
forArgumentAndArgumentNameAndValue
public static UnequalArgumentException forArgumentAndArgumentNameAndValue(Object argument, String argumentName, Object value) - Parameters:
argument-argumentName-value-- Returns:
- a new
UnequalArgumentExceptionfor the given argument, argumentName and value. - Throws:
RuntimeException- if the given argumentName is null or blank.RuntimeException- if the given value is null.
-
forArgumentAndValue
- Parameters:
argument-value-- Returns:
- a new
UnequalArgumentExceptionfor the given argument and value. - Throws:
RuntimeException- if the given value is null.
-