org.glassfish.jersey.process.internal
Class PriorityComparator<T>

java.lang.Object
  extended by org.glassfish.jersey.process.internal.PriorityComparator<T>
Type Parameters:
T - Type of the elements to be sorted.
All Implemented Interfaces:
java.util.Comparator<T>

public class PriorityComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

Comparator used to sort types by their priorities defined by annotations BindingPriority.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Nested Class Summary
static class PriorityComparator.Order
          Defines which ordering should be used for sorting.
 
Constructor Summary
PriorityComparator(PriorityComparator.Order order)
           
 
Method Summary
 int compare(T o1, T o2)
           
 
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
equals
 

Constructor Detail

PriorityComparator

public PriorityComparator(PriorityComparator.Order order)
Method Detail

compare

public int compare(T o1,
                   T o2)
Specified by:
compare in interface java.util.Comparator<T>


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.