Package net.dona.doip

## Class InDoipMessageFromJson

- java.lang.Object
- - net.dona.doip.InDoipMessageFromJson

- All Implemented Interfaces:
    `java.lang.AutoCloseable`, `java.lang.Iterable<InDoipSegment>`, `InDoipMessage`

      public class InDoipMessageFromJson
      extends java.lang.Object
      implements InDoipMessage

  An implementation of `InDoipMessage` constructed by supplying a single `JsonElement`, which will lead to a single JSON segment in the message.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InDoipMessageFromJson​(com.google.gson.JsonElement json)` | Constructs an `InDoipMessage` with a single JSON segment containing the supplied JSON.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | A no-op for this implementation.
    `java.util.Iterator<InDoipSegment>` | `iterator()` |
    `java.util.Spliterator<InDoipSegment>` | `spliterator()` |
    `java.util.stream.Stream<InDoipSegment>` | `stream()` | Returns an stream over elements of type `InDoipSegment`.

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Constructor Detail

    - #### InDoipMessageFromJson

          public InDoipMessageFromJson​(com.google.gson.JsonElement json)

      Constructs an `InDoipMessage` with a single JSON segment containing the supplied JSON.
      Parameters:
        `json` - the JSON of the single segment of the message

  - ### Method Detail

    - #### iterator

          public java.util.Iterator<InDoipSegment> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<InDoipSegment>`

    - #### spliterator

          public java.util.Spliterator<InDoipSegment> spliterator()

      Specified by:
        `spliterator` in interface `java.lang.Iterable<InDoipSegment>`

    - #### stream

          public java.util.stream.Stream<InDoipSegment> stream()

      Description copied from interface: `InDoipMessage`
      Returns an stream over elements of type `InDoipSegment`.
      Specified by:
        `stream` in interface `InDoipMessage`
      Returns:
        a Stream.

    - #### close

          public void close()

      A no-op for this implementation.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `InDoipMessage`