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

Class ObjectdrawFilter

    • Field Detail

      • and

        public final ObjectdrawFilter.BinaryOperator and
        The "and" operator for combining filters, designed to be used in expressions like where.heightIs(10).and.hiddenIs(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(ObjectdrawFilter) instead.
      • or

        public final ObjectdrawFilter.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(ObjectdrawFilter) instead.
    • Constructor Detail

      • ObjectdrawFilter

        protected ObjectdrawFilter(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 ObjectdrawFilter and(ObjectdrawFilter 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(ObjectdrawFilter).
        Parameters:
        otherFilter - The second argument to "and".
        Returns:
        A new filter object that represents "this AND otherFilter".
      • or

        public final ObjectdrawFilter or(ObjectdrawFilter 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.heightIs(10).or(hiddenIs(true).and.widthIs(20)). If you wish to use the .or. notation instead, leaving off the parentheses, see or(ObjectdrawFilter).
        Parameters:
        otherFilter - The second argument to "or".
        Returns:
        A new filter object that represents "this OR otherFilter".
      • test

        public abstract boolean test(objectdraw.DrawableInterface shape)
        Evaluate whether a DrawableInterface object 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:
        shape - The DrawableInterface object to check.
        Returns:
        true if the component matches this filter.
Student Library
Copyright © 2010-2018 Virginia Tech.