Package ddf.catalog.util.impl
Class FirstElementServiceSelectionStrategy<T>
java.lang.Object
ddf.catalog.util.impl.FirstElementServiceSelectionStrategy<T>
- Type Parameters:
T- - The type of the service to be returned.ServiceSelectionStrategy
- All Implemented Interfaces:
ServiceSelectionStrategy<T>
public class FirstElementServiceSelectionStrategy<T>
extends Object
implements ServiceSelectionStrategy<T>
This is a basic implementation of ServiceSelectionStrategy which returns the first element from
the supplied java.util.SortedSet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.osgi.framework.ServiceReference<T> selectService(SortedSet<org.osgi.framework.ServiceReference<T>> serviceSet)
-
Constructor Details
-
FirstElementServiceSelectionStrategy
public FirstElementServiceSelectionStrategy()
-
-
Method Details
-
selectService
public org.osgi.framework.ServiceReference<T> selectService(SortedSet<org.osgi.framework.ServiceReference<T>> serviceSet) - Specified by:
selectServicein interfaceServiceSelectionStrategy<T>- Parameters:
serviceSet- - An unmodifiable, sorted list of all services bound to the ServiceSelector instance.- Returns:
- the first element of serviceSet.
-