Class SmallerArgumentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.AbstractInvalidArgumentException
ch.nolix.baseapi.errorcontrol.invalidargumentexception.SmallerArgumentException
- All Implemented Interfaces:
Serializable
A
SmallerArgumentException is a
AbstractInvalidArgumentException that is supposed to be thrown when a
given argument is undesirably smaller than a given min.- Author:
- Silvan Wyss
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic SmallerArgumentExceptionforArgumentAndArgumentNameAndLimit(BigDecimal argument, String argumentName, BigDecimal limit) static SmallerArgumentExceptionforArgumentAndArgumentNameAndMin(double argument, String argumentName, double min) 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
-
forArgumentAndArgumentNameAndLimit
public static SmallerArgumentException forArgumentAndArgumentNameAndLimit(BigDecimal argument, String argumentName, BigDecimal limit) - Parameters:
argument-argumentName-limit-- Returns:
- a new
SmallerArgumentExceptionfor the given argument, argumentName and limit. - Throws:
RuntimeException- if the given argumentName is null or blank.RuntimeException- if the given limit is null.
-
forArgumentAndArgumentNameAndMin
public static SmallerArgumentException forArgumentAndArgumentNameAndMin(double argument, String argumentName, double min) - Parameters:
argument-argumentName-min-- Returns:
- a new
SmallerArgumentExceptionfor the given argument, argumentName and min. - Throws:
RuntimeException- if the given argumentName is null or blank.
-