java.lang.Object
de.siegmar.fastcsv.util.Preconditions
Internal utility class.
It is not a part of the API!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkArgument
(boolean expression, String errorMessage) Checks the given argument and throws an exception if not met.static void
checkArgument
(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) Checks the given argument and throws an exception if not met.
-
Constructor Details
-
Preconditions
private Preconditions()
-
-
Method Details
-
checkArgument
Checks the given argument and throws an exception if not met.- Parameters:
expression
- the expression that has to betrue
errorMessage
- the exception message to be thrown- Throws:
IllegalArgumentException
- if theexpression
isfalse
.
-
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 betrue
errorMessageTemplate
- the exception message template (formatString.format(String, Object...)
) to be thrownerrorMessageArgs
- the exception message arguments- Throws:
IllegalArgumentException
- if theexpression
isfalse
.
-