Class SimpleValueWrapper
- java.lang.Object
- org.springframework.cache.support.SimpleValueWrapper
- All Implemented Interfaces:
Cache.ValueWrapper
public class SimpleValueWrapper extends Object implements Cache.ValueWrapper
Straightforward implementation ofCache.ValueWrapper
, simply holding the value as given at construction and returning it fromget()
.- Since:
- 3.1
- Author:
- Costin Leau
Constructor Summary
Constructors Constructor Description SimpleValueWrapper(Object value)
Create a new SimpleValueWrapper instance for exposing the given value.
Constructor Detail
SimpleValueWrapper
public SimpleValueWrapper(@Nullable Object value)
Create a new SimpleValueWrapper instance for exposing the given value.- Parameters:
value
- the value to expose (may benull
)
Method Detail
get
@Nullable public Object get()
Simply returns the value as given at construction time.- Specified by:
get
in interfaceCache.ValueWrapper