Package 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
-
-
Field Summary
-
Fields inherited from class org.scijava.object.ObjectIndex
hoard
-
-
Constructor Summary
Constructors Constructor Description ServiceIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends Service>
SgetNextService(Class<S> c, Class<? extends S> ref)Gets the highest priority service compatible with classc, which is lower priority than therefservice.<S extends Service>
SgetPrevService(Class<S> c, Class<? extends S> ref)Gets the lowest priority service compatible with classc, which is higher priority than therefservice.<S extends Service>
SgetService(Class<S> c)Gets the first available service compatible with the given class.-
Methods inherited from class org.scijava.object.SortedObjectIndex
addAll, addToList, contains, containsAll
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
-
-
-
Method Detail
-
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 classc, which is lower priority than therefservice.
-
-