Class MediaRange

    • Constructor Detail

      • MediaRange

        public MediaRange()
    • Method Detail

      • splitOffQValue

        public static scala.Tuple2<scala.collection.immutable.Map<java.lang.String,​java.lang.String>,​java.lang.Object> splitOffQValue​(scala.collection.immutable.Map<java.lang.String,​java.lang.String> params,
                                                                                                                                                  float defaultQ)
      • custom

        public static MediaRange custom​(java.lang.String mainType,
                                        scala.collection.immutable.Map<java.lang.String,​java.lang.String> params,
                                        float qValue)
      • value

        public abstract java.lang.String value()
      • mainType

        public abstract java.lang.String mainType()
        Description copied from class: MediaRange
        Returns the main-type this media-range matches.
        Specified by:
        mainType in class MediaRange
      • params

        public abstract scala.collection.immutable.Map<java.lang.String,​java.lang.String> params()
      • qValue

        public abstract float qValue()
        Description copied from class: MediaRange
        Returns the qValue of this media-range.
        Specified by:
        qValue in class MediaRange
      • matches

        public abstract boolean matches​(MediaType mediaType)
      • isApplication

        public boolean isApplication()
      • isAudio

        public boolean isAudio()
      • isImage

        public boolean isImage()
      • isMessage

        public boolean isMessage()
      • isMultipart

        public boolean isMultipart()
      • isText

        public boolean isText()
      • isVideo

        public boolean isVideo()
      • isWildcard

        public boolean isWildcard()
      • withParams

        public abstract MediaRange withParams​(scala.collection.immutable.Map<java.lang.String,​java.lang.String> params)
        Returns a copy of this instance with the params replaced by the given ones. If the given map contains a "q" value the qValue member is (also) updated.
        Parameters:
        params - (undocumented)
        Returns:
        (undocumented)
      • withCharsetRange

        public ContentTypeRange withCharsetRange​(HttpCharsetRange charsetRange)
        Constructs a ContentTypeRange from this instance and the given charset.
        Parameters:
        charsetRange - (undocumented)
        Returns:
        (undocumented)
      • getParams

        public java.util.Map<java.lang.String,​java.lang.String> getParams()
        Java API
        Specified by:
        getParams in class MediaRange