public int compareTo()

in src/main/java/org/apache/sling/discovery/impl/standalone/ProviderInfo.java [66:75]


    public int compareTo(final ProviderInfo o) {
        // Sort by rank in ascending order.
        if ( this.ranking < o.ranking ) {
            return -1; // lower rank
        } else if (this.ranking > o.ranking ) {
            return 1; // higher rank
        }
        // If ranks are equal, then sort by service id in descending order.
        return (this.serviceId < o.serviceId) ? 1 : -1;
    }