cdac.medinfo.sdk.hl7282.commoninterface

## Interface ISingleCollection<T>

- Type Parameters:
    `T` - object - object of the type user specifies at the time of instantiation of this interface
  All Superinterfaces:
    ICollectionIterable<T>, java.lang.Iterable<T>
  All Known Implementing Classes:
    SingleCollection

      public interface ISingleCollection<T>
      extends ICollectionIterable<T>

  Provides the user with an abstract interface towards collections holding series of objects.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(T objT)` Add object to the collection.
    `boolean` | `addAll(java.util.List<T> collection)` Adds any collection into this collection.
    `boolean` | `contains(T objT)` Tests if the specified element is peresent in the collection.
    `boolean` | `containsAll(ISingleCollection<T> objSingleCollection)` Returns true if this collection contains all of the elements in the specified collection otherwise false.
    `T` | `elementAt(int iIndex)` Returns element at specified index.
    `void` | `remove(int iIndex)` Removes the element at the specified index.
    `void` | `remove(java.lang.Object objectToRemove)` Removes the specified element.
    `int` | `size()` Returns number of elements in the collection.

    - ### Methods inherited from interface cdac.medinfo.sdk.hl7282.commoninterface.ICollectionIterable

      `iterator`

- - ### Method Detail

    - #### add

          boolean add(T objT)

      Add object to the collection.
      Parameters:
        `objT` - object of the type user specifies at the time of instantiation of this interface
      Returns:
        boolean - true if element is added successfully

    - #### contains

          boolean contains(T objT)

      Tests if the specified element is peresent in the collection.
      Parameters:
        `objT` - object of the type user specifies at the time of instantiation of this interface
      Returns:
        boolean - true if elemnent is present in the collection

    - #### elementAt

          T elementAt(int iIndex)

      Returns element at specified index.
      Parameters:
        `iIndex` - the integer indicating the position of the element to be retrieved from the collection
      Returns:
        object - object of the type user specifies at the time of instantiation of this interface

    - #### size

          int size()

      Returns number of elements in the collection.
      Returns:
        int - number of elements in the collection

    - #### addAll

          boolean addAll(java.util.List<T> collection)

      Adds any collection into this collection.
      Parameters:
        `collection` - object of any class collection
      Returns:
        boolean - true if collection is successfully added

    - #### remove

          void remove(int iIndex)

      Removes the element at the specified index.
      Parameters:
        `iIndex` - - position of the element

    - #### remove

          void remove(java.lang.Object objectToRemove)

      Removes the specified element.
      Parameters:
        `objectToRemove` - object to remove

    - #### containsAll

          boolean containsAll(ISingleCollection<T> objSingleCollection)

      Returns true if this collection contains all of the elements in the specified collection otherwise false.
      Parameters:
        `objSingleCollection` - whose elements will be tested for containment in this ISingleCollection
      Returns:
        true if this ISingleCollection contains all of the elements in the specified Collection otherwise false