Class Preconditions
java.lang.Object
de.siegmar.fastcsv.util.Preconditions
Internal utility class.
It is not a part of the API!
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckArgument(boolean expression, String errorMessage) Checks the given argument and throws an exception if not met.static voidcheckArgument(boolean expression, Supplier<String> errorMessageSupplier) Checks the given argument and throws an exception if not met.
-
Method Details
-
checkArgument
Checks the given argument and throws an exception if not met.- Parameters:
expression- the expression that has to betrueerrorMessage- the exception message to be thrown- Throws:
IllegalArgumentException- if theexpressionisfalse.
-
checkArgument
Checks the given argument and throws an exception if not met.- Parameters:
expression- the expression that has to betrueerrorMessageSupplier- a supplier for the exception message to be thrown- Throws:
IllegalArgumentException- if theexpressionisfalse.
-