gravitino.utils.precondition.Precondition

class gravitino.utils.precondition.Precondition

Bases: object

__init__()

Methods

__init__()

check_argument(expression_result, error_message)

Ensures the truth of an expression involving one or more parameters to the calling method.

check_string_not_empty(check_string, ...)

Ensures the string is not empty.

static check_argument(expression_result: bool, error_message: str)

Ensures the truth of an expression involving one or more parameters to the calling method.

Args:

expression_result: A boolean expression. error_message: The error message to use if the check fails.

Raises:

IllegalArgumentException – if expression is false

static check_string_not_empty(check_string: str, error_message: str)

Ensures the string is not empty.

Args:

check_string: The string to check. error_message: The error message to use if the check fails.

Raises:

IllegalArgumentException – if the check fails.