org.qi4j.spi.entitystore.helpers

## Class JSONNamedAssociationState

- java.lang.Object
- - org.qi4j.spi.entitystore.helpers.JSONNamedAssociationState

- All Implemented Interfaces:
    Iterable<String>, NamedAssociationState

      public final class JSONNamedAssociationState
      extends Object
      implements NamedAssociationState

  JSON implementation of NamedAssociationState.

  Backed by a JSONObject.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSONNamedAssociationState(JSONEntityState entityState, JSONObject references)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsName(String name)`
    `int` | `count()`
    `EntityReference` | `get(String name)`
    `Iterator<String>` | `iterator()`
    `String` | `nameOf(EntityReference entityReference)`
    `boolean` | `put(String name, EntityReference entityReference)`
    `boolean` | `remove(String name)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### JSONNamedAssociationState

          public JSONNamedAssociationState(JSONEntityState entityState,
                                   JSONObject references)

  - ### Method Detail

    - #### count

          public int count()

      Specified by:
        `count` in interface `NamedAssociationState`

    - #### containsName

          public boolean containsName(String name)

      Specified by:
        `containsName` in interface `NamedAssociationState`

    - #### put

          public boolean put(String name,
                    EntityReference entityReference)

      Specified by:
        `put` in interface `NamedAssociationState`

    - #### remove

          public boolean remove(String name)

      Specified by:
        `remove` in interface `NamedAssociationState`

    - #### get

          public EntityReference get(String name)

      Specified by:
        `get` in interface `NamedAssociationState`

    - #### nameOf

          public String nameOf(EntityReference entityReference)

      Specified by:
        `nameOf` in interface `NamedAssociationState`

    - #### iterator

          public Iterator<String> iterator()

      Specified by:
        `iterator` in interface `Iterable<String>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`