| java.lang.Object org.cougaar.lib.contract.lang.compare.Imply
Imply | final public class Imply implements OpCodes(Code) | | Computes true if one Op "implies" another
Op .
The following notes describe the meaning of "implies":
Given two Operators, A and B.
Let "implies" be defined as:
(A implies B) :
for all Objects o1 .. on,
if (A(oi) == true) then (B(oi) == true).
For example:
A(Object o) = { return (o instanceof String); }
B(Object o) = { return ((o instanceof String) || (o instanceof List)); }
then, by the definition of "implies":
A implies B. (If o is a (String) then it must be a (String or List))
B doesn't imply A. (Object o could be a non-String List, in which case
((B(o) == true) AND (A(o) == false)))
The AND/OR relations and a small number of other Operators (NOT,
INSTANCEOF) will provide most of the logic -- anything else will be
compared using "equals".
See Also: Allow See Also: which is closely related to Imply |
Method Summary | |
final public static boolean | compute(Object o1, Object o2) | final public static boolean | compute(Op o1, Object o2) | final public static boolean | compute(Op o1, Op o2) | final protected static boolean | compute(ConstantOp o1, Op o2) | final protected static boolean | compute(GetOp o1, Op o2) | final protected static boolean | compute(AllOp o1, Op o2) | final protected static boolean | compute(EmptyOp o1, Op o2) | final protected static boolean | compute(ExistsOp o1, Op o2) | final protected static boolean | compute(AndOp o1, AndOp o2) | final protected static boolean | compute(AndOp o1, InstanceOfOp o2) | final protected static boolean | compute(AndOp o1, Op o2) | final protected static boolean | compute(FalseOp o1, Op o2) | final protected static boolean | compute(NotOp o1, Op o2) | final protected static boolean | compute(OrOp o1, OrOp o2) | final protected static boolean | compute(OrOp o1, Op o2) | final protected static boolean | compute(TrueOp o1, Op o2) | final protected static boolean | compute(ApplyOp o1, Op o2) | final protected static boolean | compute(FieldOp o1, Op o2) | final protected static boolean | compute(InstanceOfOp o1, Op o2) | final protected static boolean | compute(MethodOp o1, Op o2) | final protected static boolean | compute(ThisOp o1, Op o2) |
compute | final public static boolean compute(Op o1, Op o2)(Code) | | |
compute | final protected static boolean compute(GetOp o1, Op o2)(Code) | | |
compute | final protected static boolean compute(AllOp o1, Op o2)(Code) | | |
compute | final protected static boolean compute(AndOp o1, Op o2)(Code) | | |
compute | final protected static boolean compute(NotOp o1, Op o2)(Code) | | |
compute | final protected static boolean compute(OrOp o1, Op o2)(Code) | | |
|
|