Class WeightedMediaType

java.lang.Object
jakarta.ws.rs.core.MediaType
org.jboss.resteasy.util.WeightedMediaType
All Implemented Interfaces:
Comparable<WeightedMediaType>

public class WeightedMediaType extends jakarta.ws.rs.core.MediaType implements Comparable<WeightedMediaType>
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Summary

    Fields inherited from class jakarta.ws.rs.core.MediaType

    APPLICATION_ATOM_XML, APPLICATION_ATOM_XML_TYPE, APPLICATION_FORM_URLENCODED, APPLICATION_FORM_URLENCODED_TYPE, APPLICATION_JSON, APPLICATION_JSON_PATCH_JSON, APPLICATION_JSON_PATCH_JSON_TYPE, APPLICATION_JSON_TYPE, APPLICATION_OCTET_STREAM, APPLICATION_OCTET_STREAM_TYPE, APPLICATION_SVG_XML, APPLICATION_SVG_XML_TYPE, APPLICATION_XHTML_XML, APPLICATION_XHTML_XML_TYPE, APPLICATION_XML, APPLICATION_XML_TYPE, CHARSET_PARAMETER, MEDIA_TYPE_WILDCARD, MULTIPART_FORM_DATA, MULTIPART_FORM_DATA_TYPE, SERVER_SENT_EVENTS, SERVER_SENT_EVENTS_TYPE, TEXT_HTML, TEXT_HTML_TYPE, TEXT_PLAIN, TEXT_PLAIN_TYPE, TEXT_XML, TEXT_XML_TYPE, WILDCARD, WILDCARD_TYPE
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    float
     
    int
     
    boolean
    isCompatible(jakarta.ws.rs.core.MediaType other)
    Non-equal properties should not be compatible
    parse(jakarta.ws.rs.core.MediaType tmp)
     
     

    Methods inherited from class jakarta.ws.rs.core.MediaType

    getParameters, getSubtype, getType, isWildcardSubtype, isWildcardType, toString, withCharset

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • getWeight

      public float getWeight()
    • compareTo

      public int compareTo(WeightedMediaType o)
      Specified by:
      compareTo in interface Comparable<WeightedMediaType>
    • isCompatible

      public boolean isCompatible(jakarta.ws.rs.core.MediaType other)
      Non-equal properties should not be compatible
      Overrides:
      isCompatible in class jakarta.ws.rs.core.MediaType
    • valueOf

      public static WeightedMediaType valueOf(String type)
    • parse

      public static WeightedMediaType parse(jakarta.ws.rs.core.MediaType tmp)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class jakarta.ws.rs.core.MediaType
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class jakarta.ws.rs.core.MediaType