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
Modifier and TypeClassDescriptionstatic interface
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
requireNonNull
(T target, String message, Object... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is not null.static <T> T
requireNonNull
(T target, Supplier<String> message) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is not null.static <T> T
requireNonNull
(T target, RedisAssertions.RuntimeExceptionSupplier cause) Deprecated, for removal: This API element is subject to removal in a future version.static <T> T
requireState
(T target, String message, Object... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is not null.static <T> T
requireState
(T target, Supplier<String> message) Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is 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 givenObject
is not null.- Type Parameters:
T
-type
ofObject
being asserted.- Parameters:
target
-Object
to evaluate.message
-String
containing the message for the thrown exception.arguments
- array ofObject
arguments used to format themessage
.- Returns:
- the given
Object
. - Throws:
IllegalArgumentException
- if thetarget
is null.- See Also:
-
requireNonNull
Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is 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 givenObject
is not null.- Type Parameters:
T
-type
ofObject
being asserted.- Parameters:
target
-Object
to evaluate.message
-String
containing the message for the thrown exception.arguments
- array ofObject
arguments used to format themessage
.- Returns:
- the given
Object
. - Throws:
IllegalArgumentException
- if thetarget
is null.- See Also:
-
requireState
Deprecated, for removal: This API element is subject to removal in a future version.Asserts the givenObject
is not null.
-
Assert
utility.