Class RedisAssertions
java.lang.Object
org.springframework.data.redis.util.RedisAssertions
Deprecated, for removal: This API element is subject to removal in a future version.
Abstract utility class for common assertions used in Spring Data Redis.
- Since:
- 3.1.0
- Author:
- John Blum
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TrequireNonNull(T target, String message, Object... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null.static <T> TrequireNonNull(T target, Supplier<String> message) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null.static <T> TrequireNonNull(T target, RedisAssertions.RuntimeExceptionSupplier cause) Deprecated, for removal: This API element is subject to removal in a future version.static <T> TrequireState(T target, String message, Object... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null.static <T> TrequireState(T target, Supplier<String> message) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null.
-
Constructor Details
-
RedisAssertions
public RedisAssertions()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
requireNonNull
Deprecated, for removal: This API element is subject to removal in a future version.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:
-
requireNonNull
Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null. -
requireNonNull
public static <T> T requireNonNull(@Nullable T target, RedisAssertions.RuntimeExceptionSupplier cause) Deprecated, for removal: This API element is subject to removal in a future version. -
requireState
Deprecated, for removal: This API element is subject to removal in a future version.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:
-
requireState
Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObjectis not null.
-
Assertutility.