Package org.springframework.data.util
Class NullableWrapper
java.lang.Object
org.springframework.data.util.NullableWrapper
Simple value object to wrap a nullable delegate. Used to be able to write
Converter
implementations that
convert null into an object of some sort.- Since:
- 2.4
- Author:
- Oliver Gierke, Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionNullableWrapper
(Object value) Creates a newNullableWrapper
for the given value. -
Method Summary
-
Constructor Details
-
NullableWrapper
Creates a newNullableWrapper
for the given value.- Parameters:
value
- can be null.
-
-
Method Details
-
getValueType
Returns the type of the contained value. Will fall back toObject
in case the value is null.- Returns:
- will never be null.
-
getValue
Returns the backing value.- Returns:
- the value can be null.
-