Class MediaType.SpecificityComparator<T extends MediaType>

  • Type Parameters:
    T - the type of mime types that may be compared by this comparator
    All Implemented Interfaces:
    java.util.Comparator<T>
    Enclosing class:
    MediaType

    public static class MediaType.SpecificityComparator<T extends MediaType>
    extends java.lang.Object
    implements java.util.Comparator<T>
    Comparator to sort MediaTypes in order of specificity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(T MediaType1, T MediaType2)  
      protected int compareParameters​(T MediaType1, T MediaType2)  
      • 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
    • Constructor Detail

      • SpecificityComparator

        public SpecificityComparator()
    • Method Detail

      • compare

        public int compare​(T MediaType1,
                           T MediaType2)
        Specified by:
        compare in interface java.util.Comparator<T extends MediaType>
      • compareParameters

        protected int compareParameters​(T MediaType1,
                                        T MediaType2)