Class MediaRange

All Implemented Interfaces:
Renderable, WithQValue<MediaRange>
Direct Known Subclasses:
MediaRange.One, MediaRanges.PredefinedMediaRange

public abstract class MediaRange extends MediaRange implements Renderable, WithQValue<MediaRange>
  • Constructor Details

    • MediaRange

      public MediaRange()
  • Method Details

    • splitOffQValue

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

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

      public static MediaRange apply(MediaType mediaType)
    • apply

      public static MediaRange apply(MediaType mediaType, float qValue)
    • value

      public abstract String value()
    • mainType

      public abstract 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<String,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<String,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.
      params - (undocumented)
    • withCharsetRange

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

      public Map<String,String> getParams()
      Java API
      Specified by:
      getParams in class MediaRange
    • matches

      public boolean matches(MediaType mediaType)
      Java API
      Specified by:
      matches in class MediaRange