org.scijava.service
Class ServiceIndex
java.lang.Object
org.scijava.object.ObjectIndex<E>
org.scijava.object.SortedObjectIndex<Service>
org.scijava.service.ServiceIndex
- All Implemented Interfaces:
- Iterable<Service>, Collection<Service>
public class ServiceIndex
- extends SortedObjectIndex<Service>
Data structure for tracking registered services.
- Author:
- Curtis Rueden
Method Summary |
|
getNextService(Class<S> c,
Class<? extends S> ref)
Gets the highest priority service compatible with class c , which is
lower priority than the ref service. |
|
getPrevService(Class<S> c,
Class<? extends S> ref)
Gets the lowest priority service compatible with class c , which is
higher priority than the ref service. |
|
getService(Class<S> c)
Gets the first available service compatible with the given class. |
Methods inherited from class org.scijava.object.ObjectIndex |
add, add, add, addLater, clear, get, getAll, getBaseClass, getType, getTypes, isEmpty, iterator, remove, remove, remove, removeAll, removeFromList, retainAll, retrieveList, retrieveListsForType, size, toArray, toArray, toString |
ServiceIndex
public ServiceIndex()
getService
public <S extends Service> S getService(Class<S> c)
- Gets the first available service compatible with the given class.
getNextService
public <S extends Service> S getNextService(Class<S> c,
Class<? extends S> ref)
- Gets the highest priority service compatible with class
c
, which is
lower priority than the ref
service.
getPrevService
public <S extends Service> S getPrevService(Class<S> c,
Class<? extends S> ref)
- Gets the lowest priority service compatible with class
c
, which is
higher priority than the ref
service.
Copyright © 2009–2015 SciJava. All rights reserved.