com.io7m.jstructural.annotated

## Class SAIDMap

- java.lang.Object
- - com.io7m.jstructural.annotated.SAIDMap

- All Implemented Interfaces:
    SAIDMapReadable, SAIDMapWritable

      @Immutable
      public final class SAIDMap
      extends Object
      implements SAIDMapWritable, SAIDMapReadable

  Mappings from IDs to content.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SAIDMap(com.io7m.jlog.LogUsableType in_log)` Construct a new empty map.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SAIDTargetContent` | `get(SAID id)` Retrieve the content associated with the given ID, or `null` if there is no association.
    `void` | `put(SAID id, SAIDTargetContent c)` Associate the given content with the given ID.
    `int` | `size()`

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

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

- - ### Constructor Detail

    - #### SAIDMap

          public SAIDMap(com.io7m.jlog.LogUsableType in_log)

      Construct a new empty map.
      Parameters:
        `in_log` - The log handle

  - ### Method Detail

    - #### get

          @Nullable
          public SAIDTargetContent get(SAID id)

      Description copied from interface: `SAIDMapReadable`
      Retrieve the content associated with the given ID, or `null` if there is no association.
      Specified by:
        `get` in interface `SAIDMapReadable`
      Parameters:
        `id` - The ID
      Returns:
        The associated content

    - #### put

          public void put(SAID id,
                          SAIDTargetContent c)

      Description copied from interface: `SAIDMapWritable`
      Associate the given content with the given ID.
      Specified by:
        `put` in interface `SAIDMapWritable`
      Parameters:
        `id` - The ID
        `c` - The content

    - #### size

          public int size()

      Specified by:
        `size` in interface `SAIDMapReadable`
      Returns:
        The number of mappings

Copyright © 2015 <code@io7m.com> http://io7m.com