- java.lang.Object
-
- de.siegmar.fastcsv.util.Preconditions
-
public final class Preconditions extends java.lang.ObjectInternal utility class.It is not a part of the API!
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePreconditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckArgument(boolean expression, java.lang.String errorMessage)Checks the given argument and throws an exception if not met.static voidcheckArgument(boolean expression, java.lang.String errorMessageTemplate, java.lang.Object... errorMessageArgs)Checks the given argument and throws an exception if not met.
-
-
-
Method Detail
-
checkArgument
public static void checkArgument(boolean expression, java.lang.String errorMessage)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:
java.lang.IllegalArgumentException- if theexpressionisfalse.
-
checkArgument
public static void checkArgument(boolean expression, java.lang.String errorMessageTemplate, java.lang.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:
java.lang.IllegalArgumentException- if theexpressionisfalse.
-
-