Package org.springframework.cache.support

# 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 of `Cache.ValueWrapper`, simply holding the value as given at construction and returning it from `get()`.

Since:
  3.1
Author:
  Costin Leau

## Constructor Summary

Constructors
Constructor
Description
`SimpleValueWrapper(Object value)`
Create a new SimpleValueWrapper instance for exposing the given value.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`Object`
`get()`
Simply returns the value as given at construction time.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SimpleValueWrapper

public SimpleValueWrapper(@Nullable Object value)
Create a new SimpleValueWrapper instance for exposing the given value.

Parameters:
  `value` - the value to expose (may be `null`)

## Method Details

### get

@Nullable public Object get()
Simply returns the value as given at construction time.

Specified by:
  `get` in interface `Cache.ValueWrapper`

### equals

public boolean equals(@Nullable Object other)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`