Package io.micronaut.jms.util
Class Assert
java.lang.Object
io.micronaut.jms.util.Assert
Assertion utility methods.
- Since:
- 1.0.0
- Author:
- Burt Beckwith
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThrows an IllegalArgumentException if the boolean expression is false.static voidThrows an IllegalArgumentException if the object is null.static voidThrows an IllegalArgumentException if the object is null.
-
Constructor Details
-
Assert
public Assert()
-
-
Method Details
-
notNull
Throws an IllegalArgumentException if the object is null.- Parameters:
object- the objectmessage- the exception message to use if null- Throws:
IllegalArgumentException- if the object is null
-
notNull
public static void notNull(@Nullable @Nullable Object object, @NonNull @NonNull Supplier<String> message) Throws an IllegalArgumentException if the object is null.- Parameters:
object- the objectmessage- the exception message to use if null- Throws:
IllegalArgumentException- if the object is null
-
isTrue
Throws an IllegalArgumentException if the boolean expression is false.- Parameters:
expression- a boolean expressionmessage- the exception message to use if false- Throws:
IllegalArgumentException- if the expression is false
-