# Class State

java.lang.Object
com.google.adk.sessions.State

All Implemented Interfaces:
  `ConcurrentMap<String,Object>, Map<String,Object>`

public final class State extends Object implements ConcurrentMap<String,Object>
A `State` object that also keeps track of the changes to the state.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Map

  `Map.Entry<K,V>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `APP_PREFIX`
  `static final Object`
  `REMOVED`
  Sentinel object to mark removed entries in the delta map.
  `static final String`
  `TEMP_PREFIX`
  `static final String`
  `USER_PREFIX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `State(Map<String,Object> state)`
  `State(Map<String,Object> state, @Nullable Map<String,Object> delta)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  `boolean`
  `containsKey(Object key)`
  `boolean`
  `containsValue(Object value)`
  `Set<Map.Entry<String,Object>>`
  `entrySet()`
  `boolean`
  `equals(Object o)`
  `Object`
  `get(Object key)`
  `boolean`
  `hasDelta()`
  `int`
  `hashCode()`
  `boolean`
  `isEmpty()`
  `Set<String>`
  `keySet()`
  `Object`
  `put(String key, Object value)`
  `void`
  `putAll(Map<? extends String, ? extends Object> m)`
  `Object`
  `putIfAbsent(String key, Object value)`
  `Object`
  `remove(Object key)`
  `boolean`
  `remove(Object key, Object value)`
  `Object`
  `replace(String key, Object value)`
  `boolean`
  `replace(String key, Object oldValue, Object newValue)`
  `int`
  `size()`
  `Collection<Object>`
  `values()`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface ConcurrentMap

  `compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll`

- ## Field Details

  - ### APP_PREFIX

    public static final String APP_PREFIX
    See Also:
      - Constant Field Values

  - ### USER_PREFIX

    public static final String USER_PREFIX
    See Also:
      - Constant Field Values

  - ### TEMP_PREFIX

    public static final String TEMP_PREFIX
    See Also:
      - Constant Field Values

  - ### REMOVED

    public static final Object REMOVED
    Sentinel object to mark removed entries in the delta map.

- ## Constructor Details

  - ### State

    public State(Map<String,Object> state)

  - ### State

    public State(Map<String,Object> state, @Nullable Map<String,Object> delta)

- ## Method Details

  - ### clear

    public void clear()
    Specified by:
      `clear` in interface `Map<String,Object>`

  - ### containsKey

    public boolean containsKey(Object key)
    Specified by:
      `containsKey` in interface `Map<String,Object>`

  - ### containsValue

    public boolean containsValue(Object value)
    Specified by:
      `containsValue` in interface `Map<String,Object>`

  - ### entrySet

    public Set<Map.Entry<String,Object>> entrySet()
    Specified by:
      `entrySet` in interface `Map<String,Object>`

  - ### equals

    public boolean equals(Object o)
    Specified by:
      `equals` in interface `Map<String,Object>`
    Overrides:
      `equals` in class `Object`

  - ### get

    public Object get(Object key)
    Specified by:
      `get` in interface `Map<String,Object>`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `Map<String,Object>`
    Overrides:
      `hashCode` in class `Object`

  - ### isEmpty

    public boolean isEmpty()
    Specified by:
      `isEmpty` in interface `Map<String,Object>`

  - ### keySet

    public Set<String> keySet()
    Specified by:
      `keySet` in interface `Map<String,Object>`

  - ### put

    public Object put(String key, Object value)
    Specified by:
      `put` in interface `Map<String,Object>`

  - ### putIfAbsent

    public Object putIfAbsent(String key, Object value)
    Specified by:
      `putIfAbsent` in interface `ConcurrentMap<String,Object>`
    Specified by:
      `putIfAbsent` in interface `Map<String,Object>`

  - ### putAll

    public void putAll(Map<? extends String, ? extends Object> m)
    Specified by:
      `putAll` in interface `Map<String,Object>`

  - ### remove

    public Object remove(Object key)
    Specified by:
      `remove` in interface `Map<String,Object>`

  - ### remove

    public boolean remove(Object key, Object value)
    Specified by:
      `remove` in interface `ConcurrentMap<String,Object>`
    Specified by:
      `remove` in interface `Map<String,Object>`

  - ### replace

    public boolean replace(String key, Object oldValue, Object newValue)
    Specified by:
      `replace` in interface `ConcurrentMap<String,Object>`
    Specified by:
      `replace` in interface `Map<String,Object>`

  - ### replace

    public Object replace(String key, Object value)
    Specified by:
      `replace` in interface `ConcurrentMap<String,Object>`
    Specified by:
      `replace` in interface `Map<String,Object>`

  - ### size

    public int size()
    Specified by:
      `size` in interface `Map<String,Object>`

  - ### values

    public Collection<Object> values()
    Specified by:
      `values` in interface `Map<String,Object>`

  - ### hasDelta

    public boolean hasDelta()