cdac.medinfo.sdk.hl7282.utils

## Class PairedCollection.CollectionIterator

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.utils.PairedCollection.CollectionIterator

- All Implemented Interfaces:
    ICollectionIterator<T2>, java.util.Iterator<T2>
  Enclosing class:
    PairedCollection<T1,T2>

      public class PairedCollection.CollectionIterator
      extends java.lang.Object
      implements ICollectionIterator<T2>

  This inner class works as an Iterator which helps iterating over the map contained in the DataSet This iterator can be used for the purpose of getting all the elements of the DataSet one by one This class is implemented such that the programmer can have any object stored in it he/she wants and having ITag as its key.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PairedCollection.CollectionIterator()` Creates Instance of CollectionIterator

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Returns true if the iteration has more elements.
    `T2` | `next()` Returns the next element in the iteration.
    `void` | `remove()` Removes from the underlying collection the last element returned by the iterator.

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

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

- - ### Constructor Detail

    - #### PairedCollection.CollectionIterator

          public PairedCollection.CollectionIterator()

      Creates Instance of CollectionIterator

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Returns true if the iteration has more elements.
      Specified by:
        `hasNext` in interface `ICollectionIterator<T2>`
      Specified by:
        `hasNext` in interface `java.util.Iterator<T2>`
      Returns:
        boolean

    - #### next

          public T2 next()

      Returns the next element in the iteration.
      Specified by:
        `next` in interface `ICollectionIterator<T2>`
      Specified by:
        `next` in interface `java.util.Iterator<T2>`
      Returns:
        T2 - next element.

    - #### remove

          public void remove()

      Description copied from interface: `ICollectionIterator`
      Removes from the underlying collection the last element returned by the iterator.
      Specified by:
        `remove` in interface `ICollectionIterator<T2>`
      Specified by:
        `remove` in interface `java.util.Iterator<T2>`