Package gc.garcol.libcore
Class Preconditions
java.lang.Object
gc.garcol.libcore.Preconditions
Utility class for checking preconditions.
Provides methods to validate arguments and state conditions.
Throws appropriate exceptions if conditions are not met.
- Since:
- 2024
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckArgument(boolean success, String message) Checks if the provided argument condition is true.
-
Method Details
-
checkArgument
Checks if the provided argument condition is true. Throws an IllegalArgumentException with the specified message if the condition is false.- Parameters:
success- the condition to checkmessage- the exception message to use if the check fails- Throws:
IllegalArgumentException- if the condition is false
-