# SavedStateValue

Artifact: [androidx.savedstate:savedstate](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/savedstate/SavedStateValue.kt+class:androidx.savedstate.SavedStateValue) Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt#1.6.0-alpha05)

*** ** * ** ***


```
public interface SavedStateValue<T extends Object> extends SavedStateRegistry.SavedStateProvider, SavedStateRegistry.SavedStateRestorer
```

<br />

*** ** * ** ***

Interface representing a saved state component holding a `value`.

A `SavedStateValue` combines state saving (`SavedStateProvider`) and restoration (`SavedStateRestorer`) with direct access to the underlying `value`.

| Parameters |
|---|---|
| `<T extends Object>` | type of the underlying value |

## Summary

| ### Public methods |
|---|---|
| `abstract @NonNull T` | `getValue()` The current value held by this saved state component. |

### Inherited methods

From [androidx.savedstate.SavedStateRegistry.SavedStateProvider](https://developer.android.com/reference/androidx/savedstate/SavedStateRegistry.SavedStateProvider.md.txt) `abstract @NonNull SavedState` `saveState()`

Called to retrieve the state from a component before it is killed so the state can be retrieved later from `consumeRestoredStateForKey`.
From [androidx.savedstate.SavedStateRegistry.SavedStateRestorer](https://developer.android.com/reference/androidx/savedstate/SavedStateRegistry.SavedStateRestorer.md.txt) `abstract void` `restoreState(SavedState savedState)`

Called to restore the state of a component.

## Public methods

### getValue

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt#1.6.0-alpha05)

```
abstract @NonNull T getValue()
```

The current value held by this saved state component.