Package org.springframework.cache.support

# Class NullValue

java.lang.Object
org.springframework.cache.support.NullValue

All Implemented Interfaces:
  `Serializable`

public final class NullValue extends Object implements Serializable
Simple serializable class that serves as a `null` replacement for cache stores which otherwise do not support `null` values.

Since:
  4.2.2
Author:
  Juergen Hoeller
See Also:
  - `AbstractValueAdaptingCache`
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Object`
`INSTANCE`
The canonical representation of a `null` replacement, as used by the default implementation of `AbstractValueAdaptingCache.toStoreValue(java.lang.Object)`/ `AbstractValueAdaptingCache.fromStoreValue(java.lang.Object)`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`int`
`hashCode()`
`String`
`toString()`

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

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

## Field Details

### INSTANCE

public static final Object INSTANCE
The canonical representation of a `null` replacement, as used by the default implementation of `AbstractValueAdaptingCache.toStoreValue(java.lang.Object)`/ `AbstractValueAdaptingCache.fromStoreValue(java.lang.Object)`.

Since:
  4.3.10

## Method Details

### 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`