Class Assert
- java.lang.Object
-
- com.snowflake.connectors.util.snowflake.assertions.Assert
-
public class Assert extends Object
Utility class to allow for basic sanity checks.
-
-
Constructor Summary
Constructors Constructor Description Assert()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckThat(boolean value)Throws an exception when the provided boolean is falsestatic voidcheckThat(boolean value, String message)Throws an exception when the provided boolean is falsestatic voidcheckThat(BooleanSupplier supplier)Throws an exception when the given boolean supplier returns false.static voidcheckThat(BooleanSupplier supplier, String message)Throws an exception when the given boolean supplier returns false.
-
-
-
Method Detail
-
checkThat
public static void checkThat(BooleanSupplier supplier, String message)
Throws an exception when the given boolean supplier returns false.- Parameters:
supplier- boolean supplier check functionmessage- message to be included in the thrown exception- Throws:
IllegalArgumentException- when the given boolean supplier returns false
-
checkThat
public static void checkThat(BooleanSupplier supplier)
Throws an exception when the given boolean supplier returns false.- Parameters:
supplier- boolean supplier check function- Throws:
IllegalArgumentException- when the given boolean supplier returns false
-
checkThat
public static void checkThat(boolean value, String message)Throws an exception when the provided boolean is false- Parameters:
value- boolean value being checkedmessage- message to be included in the thrown exception- Throws:
IllegalArgumentException- when the given boolean is false
-
checkThat
public static void checkThat(boolean value)
Throws an exception when the provided boolean is false- Parameters:
value- boolean value being checked- Throws:
IllegalArgumentException- when the given boolean is false
-
-