Class MessageBodyFactory.DeclarationDistanceComparator<T>
java.lang.Object
org.glassfish.jersey.message.internal.MessageBodyFactory.DeclarationDistanceComparator<T>
- Type Parameters:
T
- common super-type used for computing the declaration distance and comparing instances.
- All Implemented Interfaces:
Comparator<T>
- Enclosing class:
- MessageBodyFactory
private static class MessageBodyFactory.DeclarationDistanceComparator<T>
extends Object
implements Comparator<T>
Compares 2 instances implementing/inheriting the same super-type and returns
which of the two instances has the super-type declaration closer in it's
inheritance hierarchy tree.
The comparator is optimized to cache results of the previous distance declaration
computations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
declared
-
distanceMap
-
-
Constructor Details
-
DeclarationDistanceComparator
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<T>
-
getDistance
-