public abstract class ObjectdrawFilter.BinaryOperator extends ObjectdrawFilter.Operator
Constructor and Description |
---|
BinaryOperator() |
Modifier and Type | Method and Description |
---|---|
protected ObjectdrawFilter |
applySelfTo(ObjectdrawFilter 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.
|
ObjectdrawFilter |
not(ObjectdrawFilter otherFilter)
The "not" operator for negating an existing filter, when you
want to use parentheses to group its righthand argument.
|
colorIs, heightIs, hiddenIs, isContainedWithin, isLocatedWithin, lineEndLocationIs, lineEndLocationIs, lineStartLocationIs, lineStartLocationIs, locationIs, sizeIs, sizeIsWithin, textIs, typeIs, widthIs, xLocationIs, yLocationIs
public ObjectdrawFilter not(ObjectdrawFilter 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.ObjectdrawFilter)
.otherFilter
- The filter to negateprotected ObjectdrawFilter applySelfTo(ObjectdrawFilter otherFilter)
applySelfTo
in class ObjectdrawFilter.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