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

com.sas.services.discovery
Class Services

com.sas.services.discovery.Services
All Implemented Interfaces:
java.io.Serializable

public class Services
implements java.io.Serializable

A type-safe collection of services which implement the RemoteServiceInterface interface.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
Services()
          Default constructor that initializes this collection with no services.
Services(Services services)
          Constructor that initializes this collection with the specified services.
 
Method Summary
 boolean add(java.lang.Object object)
          Adds a RemoteServiceInterface object to this collection.
 boolean add(RemoteServiceInterface service)
          Adds a RemoteServiceInterface object to this collection.
 boolean addAll(Services services)
          Adds all of the services to this collection.
 java.util.Collection getCollection()
          Gets the collection of services.
 java.util.Iterator iterator()
          Gets an iterator for the services.
 boolean remove(RemoteServiceInterface service)
          Removes a RemoteServiceInterface object from this collection.
 boolean removeAll(Services services)
          Removes all of the services from this collection.
 void setCollection(java.util.Collection collection)
          Gets the collection of services.
 int size()
          Gets the number of services in the collection.
 

Constructor Detail

Services

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


Services

public Services(Services services)
         throws java.lang.IllegalArgumentException
Constructor that initializes this collection with the specified services.

Parameters:
services - Services to add to this collection.
Throws:
java.lang.IllegalArgumentException - if a null services parameter is specified.
Method Detail

add

public final boolean add(java.lang.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 java.util.Collection getCollection()
Gets the collection of services.

Returns:
Service collection.

setCollection

public final void setCollection(java.util.Collection collection)
Gets the collection of services.

Parameters:
collection - Service collection. Each element must implement the base service interface RemoteServiceInterface.

iterator

public final java.util.Iterator 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.

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.