Class RedisAssertions
java.lang.Object
org.springframework.data.redis.util.RedisAssertions
Abstract utility class for common assertions used in Spring Data Redis.
- Since:
- 3.1.0
- Author:
- John Blum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TrequireObject(T target, String message, Object... arguments) Asserts the givenObjectis not null.static <T> TrequireObject(T target, Supplier<String> message) Asserts the givenObjectis not null.
-
Constructor Details
-
RedisAssertions
public RedisAssertions()
-
-
Method Details
-
requireObject
Asserts the givenObjectis not null.- Type Parameters:
T-typeofObjectbeing asserted.- Parameters:
target-Objectto evaluate.message-Stringcontaining the message for the thrown exception.arguments- array ofObjectarguments used to format themessage.- Returns:
- the given
Object. - Throws:
IllegalArgumentException- if thetargetis null.- See Also:
-
requireObject
Asserts the givenObjectis not null.
-