Package org.jboss.resteasy.core.providerfactory

## Class SortedKey<T>

- java.lang.Object
- - org.jboss.resteasy.core.providerfactory.SortedKey<T>

- All Implemented Interfaces:
    `Comparable<SortedKey<T>>`, `MediaTypeMap.Typed`
  Direct Known Subclasses:
    `ExtSortedKey`

      public class SortedKey<T>
      extends Object
      implements Comparable<SortedKey<T>>, MediaTypeMap.Typed

  Allow us to sort message body implementations that are more specific for their types i.e. MessageBodyWriter<Object> is less specific than MessageBodyWriter<String>.

  This helps out a lot when the desired media type is a wildcard and to weed out all the possible default mappings.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SortedKey​(Class<?> intf, T reader, Class<?> readerClass)` |
    `SortedKey​(Class<?> intf, T reader, Class<?> readerClass, boolean isBuiltin)` |
    `SortedKey​(Class<?> intf, T reader, Class<?> readerClass, int priority, boolean isBuiltin)` |
    `SortedKey​(T obj, boolean isBuiltin, Class<?> template, int priority)` | Direct populate

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(SortedKey<T> tMessageBodyKey)` |
    `T` | `getObj()` |
    `int` | `getPriority()` |
    `Class<?>` | `getType()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SortedKey

          public SortedKey​(Class<?> intf,
                           T reader,
                           Class<?> readerClass,
                           int priority,
                           boolean isBuiltin)

    - #### SortedKey

          public SortedKey​(Class<?> intf,
                           T reader,
                           Class<?> readerClass,
                           boolean isBuiltin)

    - #### SortedKey

          public SortedKey​(Class<?> intf,
                           T reader,
                           Class<?> readerClass)

    - #### SortedKey

          public SortedKey​(T obj,
                           boolean isBuiltin,
                           Class<?> template,
                           int priority)

      Direct populate
      Parameters:
        `obj` -
        `isBuiltin` -
        `template` - template class of component type
        `priority` -

  - ### Method Detail

    - #### compareTo

          public int compareTo​(SortedKey<T> tMessageBodyKey)

      Specified by:
        `compareTo` in interface `Comparable<T>`

    - #### getType

          public Class<?> getType()

      Specified by:
        `getType` in interface `MediaTypeMap.Typed`

    - #### getObj

          public T getObj()

    - #### getPriority

          public int getPriority()