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, String errorMessageTemplate, Object... errorMessageArgs) 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
public static void checkArgument(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) Checks the given argument and throws an exception if not met.- Parameters:
expression- the expression that has to betrueerrorMessageTemplate- the exception message template (formatString.format(String, Object...)) to be thrownerrorMessageArgs- the exception message arguments- Throws:
IllegalArgumentException- if theexpressionisfalse.
-