Class EqualArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.AbstractInvalidArgumentException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.EqualArgumentException
- All Implemented Interfaces:
Serializable
A
EqualArgumentException is a
AbstractInvalidArgumentException that is supposed to be thrown when a
given argument equals undesirably a given value.- Author:
- Silvan Wyss
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic EqualArgumentExceptionforArgumentAndArgumentNameAndEqualValue(double argument, String argumentName, double equalValue) static EqualArgumentExceptionforArgumentAndArgumentNameAndEqualValue(long argument, String argumentName, long equalValue) static EqualArgumentExceptionforArgumentAndEqualValue(Object argument, Object equalValue) 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
-
forArgumentAndArgumentNameAndEqualValue
public static EqualArgumentException forArgumentAndArgumentNameAndEqualValue(double argument, String argumentName, double equalValue) - Parameters:
argument- - Can be null.argumentName-equalValue- - Can be null.- Returns:
- a new
EqualArgumentExceptionfor the given argument, argumentName and equalValue. - Throws:
RuntimeException- if the given argumentName is null or blank.
-
forArgumentAndArgumentNameAndEqualValue
public static EqualArgumentException forArgumentAndArgumentNameAndEqualValue(long argument, String argumentName, long equalValue) - Parameters:
argument- - Can be null.argumentName-equalValue- - Can be null.- Returns:
- a new
EqualArgumentExceptionfor the given argument, argumentName and equalValue. - Throws:
RuntimeException- if the given argumentName is null or blank.
-
forArgumentAndEqualValue
- Parameters:
argument- - Can be null.equalValue- - Can be null.- Returns:
- a new
EqualArgumentExceptionfor the given argument and equalValue.
-