Skip navigation links
Student Library
Copyright © 2010-2018 Virginia Tech.
student.testingsupport

Class GUIFilter

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      class  GUIFilter.BinaryOperator
      A non-static subclass for binary operators that implicitly captures the outer filter to which it belongs, using it as the first/left argument to the operator.
      static class  GUIFilter.ClientImports
      This class represents the "where" operator that is used to begin a filter expression.
      static class  GUIFilter.Operator
      This base class represents an operator used to create a query.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      GUIFilter.BinaryOperator and
      The "and" operator for combining filters, designed to be used in expressions like where.nameIs("...").and.enabledIs(true).
      GUIFilter.BinaryOperator or
      The "or" operator for combining filters, designed to be used in expressions like where.nameIs("abc").or.nameIs("def").
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected GUIFilter(String description)
      Creates a new filter object.
    • Field Detail

      • and

        public final GUIFilter.BinaryOperator and
        The "and" operator for combining filters, designed to be used in expressions like where.nameIs("...").and.enabledIs(true). This operator is implemented as a public field so that the simple .and. notation can be used as a connective between filters. If you want to use parentheses for grouping to define the right argument, see and(GUIFilter) instead.
      • or

        public final GUIFilter.BinaryOperator or
        The "or" operator for combining filters, designed to be used in expressions like where.nameIs("abc").or.nameIs("def"). This operator is implemented as a public field so that the simple .or. notation can be used as a connective between filters. If you want to use parentheses for grouping to define the right argument, see or(GUIFilter) instead.
    • Constructor Detail

      • GUIFilter

        protected GUIFilter(String description)
        Creates a new filter object. This constructor is not public, since all filters are expected to be created using operators rather than by calling new.
        Parameters:
        description - A string description of this filter, used in toString().
    • Method Detail

      • toString

        public String toString()
        Get a string representation of this filter.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this filter.
      • and

        public final GUIFilter and(GUIFilter otherFilter)
        The "and" operator for combining filters, when you want to use parentheses to group its righthand argument. This method is designed to be used in expressions like where.nameIs("abc").and(enabledIs(true).or.hasFocusIs(true)). If you wish to use the .and. notation instead, leaving off the parentheses, see and(GUIFilter).
        Parameters:
        otherFilter - The second argument to "and".
        Returns:
        A new filter object that represents "this AND otherFilter".
      • or

        public final GUIFilter or(GUIFilter otherFilter)
        The "or" operator for combining filters, when you want to use parentheses to group its righthand argument. This method is designed to be used in expressions like where.nameIs("abc").or(enabledIs(true).and.hasFocusIs(true)). If you wish to use the .or. notation instead, leaving off the parentheses, see or(GUIFilter).
        Parameters:
        otherFilter - The second argument to "or".
        Returns:
        A new filter object that represents "this OR otherFilter".
      • test

        public abstract boolean test(Component component)
        Evaluate whether a component matches this filter. This operation is intended to be overridden by each subclass to implement the actual check that a specific kind of filter performs.
        Parameters:
        component - The component to check
        Returns:
        true if the component matches this filter
Student Library
Copyright © 2010-2018 Virginia Tech.