Class MediaRange

  • Direct Known Subclasses:
    MediaRange

    public abstract class MediaRange
    extends java.lang.Object
    Represents an Http media-range. A media-range either matches a single media-type or it matches all media-types of a given main-type. Each range can specify a qValue or other parameters.
    • Constructor Summary

      Constructors 
      Constructor Description
      MediaRange()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.util.Map<java.lang.String,​java.lang.String> getParams()
      Returns a Map of the parameters of this media-range.
      abstract java.lang.String mainType()
      Returns the main-type this media-range matches.
      abstract boolean matches​(MediaType mediaType)
      Checks if this range matches a given media-type.
      abstract float qValue()
      Returns the qValue of this media-range.
      abstract MediaRange withQValue​(float qValue)
      Returns a copy of this instance with a changed qValue.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MediaRange

        public MediaRange()
    • Method Detail

      • mainType

        public abstract java.lang.String mainType()
        Returns the main-type this media-range matches.
      • qValue

        public abstract float qValue()
        Returns the qValue of this media-range.
      • matches

        public abstract boolean matches​(MediaType mediaType)
        Checks if this range matches a given media-type.
      • getParams

        public abstract java.util.Map<java.lang.String,​java.lang.String> getParams()
        Returns a Map of the parameters of this media-range.
      • withQValue

        public abstract MediaRange withQValue​(float qValue)
        Returns a copy of this instance with a changed qValue.