Class MediaQuery


  • public class MediaQuery
    extends java.lang.Object
    Class that bundles all the media query properties.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<MediaExpression> expressions
      The expressions.
      private boolean not
      The logical "not" value.
      private boolean only
      The logical "only" value.
      private java.lang.String type
      The type.
    • Constructor Summary

      Constructors 
      Constructor Description
      MediaQuery​(java.lang.String type, java.util.List<MediaExpression> expressions, boolean only, boolean not)
      Creates a new MediaQuery instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(MediaDeviceDescription deviceDescription)
      Tries to match a device description with the media query.
      • Methods inherited from class java.lang.Object

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

      • only

        private boolean only
        The logical "only" value.
      • not

        private boolean not
        The logical "not" value.
      • type

        private java.lang.String type
        The type.
      • expressions

        private java.util.List<MediaExpression> expressions
        The expressions.
    • Constructor Detail

      • MediaQuery

        MediaQuery​(java.lang.String type,
                   java.util.List<MediaExpression> expressions,
                   boolean only,
                   boolean not)
        Creates a new MediaQuery instance.
        Parameters:
        type - the type
        expressions - the expressions
        only - logical "only" value
        not - logical "not" value
    • Method Detail

      • matches

        public boolean matches​(MediaDeviceDescription deviceDescription)
        Tries to match a device description with the media query.
        Parameters:
        deviceDescription - the device description
        Returns:
        true, if successful