Package ddf.catalog.util.impl
Class ServiceComparator
java.lang.Object
ddf.catalog.util.impl.ServiceComparator
- All Implemented Interfaces:
Serializable,Comparator<org.osgi.framework.ServiceReference>
public class ServiceComparator
extends Object
implements Comparator<org.osgi.framework.ServiceReference>, Serializable
Comparator for OSGi
ServiceReference objects.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(org.osgi.framework.ServiceReference ref1, org.osgi.framework.ServiceReference ref2) Compares this ServiceReference with the specified ServiceReference for order using the OSGiServiceReferencecompare method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ServiceComparator
public ServiceComparator()
-
-
Method Details
-
compare
public int compare(org.osgi.framework.ServiceReference ref1, org.osgi.framework.ServiceReference ref2) Compares this ServiceReference with the specified ServiceReference for order using the OSGiServiceReferencecompare method.If this ServiceReference and the specified ServiceReference have the same service id they are equal. This ServiceReference is less than the specified ServiceReference if it has a lower service ranking and greater if it has a higher service ranking. Otherwise, if this ServiceReference and the specified ServiceReference have the same service ranking, this ServiceReference is less than the specified ServiceReference if it has a higher service id and greater if it has a lower service id.
- Specified by:
comparein interfaceComparator<org.osgi.framework.ServiceReference>
-