sub_arctic.lib
Class pred_and
java.lang.Object
|
+--sub_arctic.lib.pred_and
- public class pred_and
- extends java.lang.Object
- implements interactor_pred
Interactor predicate class that does an AND operation across the results of
two other interactor_pred objects it is composed out of. The composed
objects both get the same test object and parameters and so must be
compatible in terms of the object types they expect.
- See Also:
base_interactor.traverse_and_collect(int, int, sub_arctic.lib.interactor_pred, sub_arctic.lib.interactor_pred, sub_arctic.lib.traversal_xform, java.lang.Object, sub_arctic.input.pick_collector)
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_op1
protected interactor_pred _op1
- First component predicate.
_op2
protected interactor_pred _op2
- Second component predicate
pred_and
public pred_and(interactor_pred p1,
interactor_pred p2)
- Construct new predicate from two other predicates.
- Parameters:
interactor_pred
- p1 the first predicate.interactor_pred
- p2 the second predicate.
op1
public interactor_pred op1()
- First component predicate.
- Returns:
- interactor_pred the first component predicate.
set_op1
public void set_op1(interactor_pred p)
- Set first component predicate.
- Parameters:
interactor_pred
- p the new first component predicate.
op2
public interactor_pred op2()
- Second component predicate.
- Returns:
- interactor_pred the second component predicate.
set_op2
public void set_op2(interactor_pred p)
- Set second component predicate.
- Parameters:
interactor_pred
- p the new first component predicate.
test
public boolean test(interactor obj,
java.lang.Object parameters)
- Perform the predicate test by ANDing the result of two component
predicates. Note: AND is done with && so the second predicate will not
be invoked if the first one returns false.
- Specified by:
- test in interface interactor_pred
- Parameters:
obj
- the interactor the predicate is testing.parameters
- the additional parameters (of subclass specific type)
to the predicate (passed to both component predicates).- Returns:
- AND of results from two component predicates.