cdac.medinfo.sdk.hl7282.baselibs.segments

## Class SegmentSet

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.SegmentSet

- All Implemented Interfaces:
    ISegmentSet

      public class SegmentSet
      extends java.lang.Object
      implements ISegmentSet

  SegmentSet represents a list of Segments. It provides required method to operate upon different segments which collectively represents a HL7 Message.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SegmentSet()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSegment(ISegment objSegment)` Adds a segment in list.
    `void` | `addUnRecognizedSegment(UnRecognizedSegment objUnRecognizedSegment)` Add UnRecodnizedSegment in list
    `ISingleCollection<ISegment>` | `getList()` Retrieves list of segments
    `ISegment` | `getSegment(int iIndex)` Retrieves a Segment from a given index position.
    `ISingleCollection<UnRecognizedSegment>` | `getUnRecognizedSegments()` Retrieves list of Unrecognized segments.
    `ICollectionIterator<ISegment>` | `iterator()` Provides iterator over the collection of Segments
    `int` | `size()` Retrieves size of SegmentSet

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

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

- - ### Constructor Detail

    - #### SegmentSet

          public SegmentSet()

  - ### Method Detail

    - #### addSegment

          public void addSegment(ISegment objSegment)

      Adds a segment in list.
      Specified by:
        `addSegment` in interface `ISegmentSet`
      Parameters:
        `objSegment` - instance of segment

    - #### addUnRecognizedSegment

          public void addUnRecognizedSegment(UnRecognizedSegment objUnRecognizedSegment)

      Add UnRecodnizedSegment in list
      Specified by:
        `addUnRecognizedSegment` in interface `ISegmentSet`
      Parameters:
        `objUnRecognizedSegment` - object of unrecognizedSegment.

    - #### getUnRecognizedSegments

          public ISingleCollection<UnRecognizedSegment> getUnRecognizedSegments()

      Retrieves list of Unrecognized segments.
      Specified by:
        `getUnRecognizedSegments` in interface `ISegmentSet`
      Returns:
        Isinglecollection - list of UnRecognized Segment.

    - #### getList

          public ISingleCollection<ISegment> getList()

      Retrieves list of segments
      Specified by:
        `getList` in interface `ISegmentSet`
      Returns:
        ISingleCollection - list of segments.

    - #### getSegment

          public ISegment getSegment(int iIndex)

      Retrieves a Segment from a given index position.
      Specified by:
        `getSegment` in interface `ISegmentSet`
      Parameters:
        `iIndex` - value of index
      Returns:
        ISegment - instance of Segment

    - #### iterator

          public ICollectionIterator<ISegment> iterator()

      Provides iterator over the collection of Segments
      Specified by:
        `iterator` in interface `ISegmentSet`
      Returns:
        ICollectionIterator - custom iterator over the collection of Segments

    - #### size

          public int size()

      Retrieves size of SegmentSet
      Specified by:
        `size` in interface `ISegmentSet`
      Returns:
        int - size of set