### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.discovery

# Class Services

java.lang.Object
com.sas.services.discovery.Services

All Implemented Interfaces:
  `Serializable`

@SASScope("ALL") @BinaryCompatibilityOnly public class Services extends Object implements Serializable
A type-safe collection of services which implement the `RemoteServiceInterface` interface.

Since:
  1.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Services()`
  Default constructor that initializes this collection with no services.
  `Services(Services services)`
  Constructor that initializes this collection with the specified services.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final boolean`
  `add(RemoteServiceInterface service)`
  Adds a `RemoteServiceInterface` object to this collection.
  `final boolean`
  `add(Object object)`
  Adds a `RemoteServiceInterface` object to this collection.
  `final boolean`
  `addAll(Services services)`
  Adds all of the services to this collection.
  `final Collection<RemoteServiceInterface>`
  `getCollection()`
  Gets the collection of services.
  `final Iterator<RemoteServiceInterface>`
  `iterator()`
  Gets an iterator for the services.
  `final boolean`
  `remove(RemoteServiceInterface service)`
  Removes a `RemoteServiceInterface` object from this collection.
  `final boolean`
  `removeAll(Services services)`
  Removes all of the services from this collection.
  `final void`
  `setCollection(Collection<RemoteServiceInterface> collection)`
  Gets the collection of services.
  `final int`
  `size()`
  Gets the number of services in the collection.

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

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

- ## Constructor Details

  - ### Services

    public Services()
    Default constructor that initializes this collection with no services.

  - ### Services

    public Services(Services services) throws IllegalArgumentException
    Constructor that initializes this collection with the specified services.
    Parameters:
      `services` - Services to add to this collection.
    Throws:
      `IllegalArgumentException` - if a `null` services parameter is specified.

- ## Method Details

  - ### add

    public final boolean add(Object object)
    Adds a `RemoteServiceInterface` object to this collection. If the object already exists in this collection, then the collection is not updated. A `null` parameter is also disregarded.
    Parameters:
      `object` - An implementation of a `RemoteServiceInterface`.
    Returns:
      `true` if the service was added or `false` if it wasn't.

  - ### add

    public final boolean add(RemoteServiceInterface service)
    Adds a `RemoteServiceInterface` object to this collection. If the object already exists in this collection, then the collection is not updated. A `null` parameter is also disregarded.
    Parameters:
      `service` - An implementation of a `RemoteServiceInterface`.
    Returns:
      `true` if the service was added or `false` if it wasn't.

  - ### remove

    public final boolean remove(RemoteServiceInterface service)
    Removes a `RemoteServiceInterface` object from this collection.
    Parameters:
      `service` - An implementation of a `RemoteServiceInterface`.
    Returns:
      `true` if the collection contained the item to be removed.

  - ### addAll

    public final boolean addAll(Services services)
    Adds all of the services to this collection.
    Parameters:
      `services` - Collection of services to add to this collection.
    Returns:
      `true` if this collection was altered, `false` if it wasn't.

  - ### removeAll

    public final boolean removeAll(Services services)
    Removes all of the services from this collection.
    Parameters:
      `services` - Collection of services to remove from this collection.
    Returns:
      `true` if this collection was altered, `false` if it wasn't.

  - ### getCollection

    public final Collection<RemoteServiceInterface> getCollection()
    Gets the collection of services.
    Returns:
      Service collection.

  - ### setCollection

    public final void setCollection(Collection<RemoteServiceInterface> collection)
    Gets the collection of services.
    Parameters:
      `collection` - Service collection. Each element must implement the base service interface `RemoteServiceInterface`.

  - ### iterator

    public final Iterator<RemoteServiceInterface> iterator()
    Gets an iterator for the services.
    Returns:
      Iterator for a copy of the set of services.

  - ### size

    public final int size()
    Gets the number of services in the collection.
    Returns:
      Number of services in the collection.