org.apache.felix.cm.impl
Class RankingComparator
java.lang.Object
org.apache.felix.cm.impl.RankingComparator
- All Implemented Interfaces:
- java.util.Comparator
public abstract class RankingComparator
- extends java.lang.Object
- implements java.util.Comparator
The RankingComparator may be used to maintain sorted
sets or to sort arrays such that the first element in the set or
array is the one to use first and the last elementis the one to
use last.
|
Field Summary |
static java.util.Comparator |
CM_RANKING
Implements a comparator to sort arrays and sets according to the
specification of the service.cmRanking property in
the Configuration Admin specification. |
static java.util.Comparator |
SRV_RANKING
Implements a comparator to sort arrays and sets according to the
specification of the service.ranking property. |
|
Method Summary |
protected long |
getLong(org.osgi.framework.ServiceReference sr,
java.lang.String property)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
compare, equals |
SRV_RANKING
public static java.util.Comparator SRV_RANKING
- Implements a comparator to sort arrays and sets according to the
specification of the
service.ranking property. This
results in collections whose first element has the highest ranking
and the last element has the lowest ranking. Thus the results of
this comparator are as follows:
< 0 if obj1 has higher ranking than obj2
== 0 if obj1 and obj2 reference the same service
> 0 if obj1 has lower ranking than obj2
CM_RANKING
public static java.util.Comparator CM_RANKING
- Implements a comparator to sort arrays and sets according to the
specification of the
service.cmRanking property in
the Configuration Admin specification. This results in collections
where the first element has the lowest ranking value and the last
element has the highest ranking value. Order amongst elements with
the same ranking value is left undefined. Thus the results of this
comparator are as follows:
< 0 if obj1 has lower ranking than obj2
== 0 if obj1 and obj2 have the same ranking
> 0 if obj1 has higher ranking than obj2
RankingComparator
public RankingComparator()
getLong
protected long getLong(org.osgi.framework.ServiceReference sr,
java.lang.String property)
Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.