Package net.dona.doip

## Class InDoipMessageFromCollection

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

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

      public class InDoipMessageFromCollection
      extends java.lang.Object
      implements InDoipMessage

  An implementation of `InDoipMessage` constructed by supplying an explicit collection of `InDoipSegment`s.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InDoipMessageFromCollection​(java.util.Collection<InDoipSegment> segments)` | Constructs an `InDoipMessage` whose segments are those in the supplied collection.

  - ### 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

    - #### InDoipMessageFromCollection

          public InDoipMessageFromCollection​(java.util.Collection<InDoipSegment> segments)

      Constructs an `InDoipMessage` whose segments are those in the supplied collection.
      Parameters:
        `segments` - the segments 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`