public abstract class GUIFilter.BinaryOperator extends GUIFilter.Operator
Constructor and Description |
---|
BinaryOperator() |
Modifier and Type | Method and Description |
---|---|
protected GUIFilter |
applySelfTo(GUIFilter otherFilter)
Implements a composite filter based on a binary operation,
where the "left"/"first" filter is the parent from which this
class was created, and the "right"/"second" filter is the
argument supplied to this operation.
|
protected abstract boolean |
combine(boolean leftResult,
boolean rightResult)
Concrete subclasses must override this to implement the
appropriate logic for combining the results of the two filters
being combined.
|
protected abstract String |
description(String leftDescription,
String rightDescription)
Concrete subclasses must override this to implement the
appropriate logic for building a description of this filter
based on the descriptions of the two filters
being combined.
|
GUIFilter |
not(GUIFilter otherFilter)
The "not" operator for negating an existing filter, when you
want to use parentheses to group its righthand argument.
|
ancestorIs, enabledIs, hasFocusIs, heightIs, isContainedWithin, isLocatedWithin, locationIs, nameIs, parentIs, sizeIs, sizeIsWithin, textIs, typeIs, widthIs, xLocationIs, yLocationIs
public GUIFilter not(GUIFilter otherFilter)
where.nameIs("abc").and.not(enabledIs(true).or.hasFocusIs(true))
.
If you wish to use the .not.
notation instead, leaving
off the parentheses, see not(student.testingsupport.GUIFilter)
.otherFilter
- The filter to negateprotected GUIFilter applySelfTo(GUIFilter otherFilter)
applySelfTo
in class GUIFilter.Operator
otherFilter
- The argument to transform (second argument,
for binary operators)protected abstract boolean combine(boolean leftResult, boolean rightResult)
leftResult
- The boolean result of the left filterrightResult
- The boolean result of the right filterprotected abstract String description(String leftDescription, String rightDescription)
leftDescription
- The description of the left filterrightDescription
- The description of the right filter