edu.buffalo.fs7.mathlib
Class ConditionalOp
java.lang.Object
|
+--edu.buffalo.fs7.mathlib.MathObject
|
+--edu.buffalo.fs7.mathlib.Operator
|
+--edu.buffalo.fs7.mathlib.ConditionalOp
- All Implemented Interfaces:
- java.lang.Cloneable
- public class ConditionalOp
- extends Operator
Class representing conditional operators like "==", "!=","&&", "||"
|
Constructor Summary |
ConditionalOp(java.lang.String data)
creates a conditional operator specified by data. |
|
Method Summary |
MathObject |
apply(Argument a1,
Argument a2)
applies the contitional operator between the two arguments given by a1, a2 |
java.lang.String |
toString()
string representation of the conditional operator |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ConditionalOp
public ConditionalOp(java.lang.String data)
- creates a conditional operator specified by data. Allowed
parameters are "==", "!=", "&&", "||"
apply
public MathObject apply(Argument a1,
Argument a2)
- applies the contitional operator between the two arguments given by a1, a2
- Parameters:
a1 - left hand side argumenta2 - right hand side argument- Returns:
- boolean as complex number (re() = 0 for false)
toString
public java.lang.String toString()
- string representation of the conditional operator
- Overrides:
toString in class MathObject
- Following copied from class:
edu.buffalo.fs7.mathlib.MathObject
- See Also:
MathObject.toParseableString()