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 "==", "!=","&&", "||"


Fields inherited from class edu.buffalo.fs7.mathlib.MathObject
mathlib
 
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 edu.buffalo.fs7.mathlib.MathObject
clone, toParseableString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionalOp

public ConditionalOp(java.lang.String data)
creates a conditional operator specified by data. Allowed parameters are "==", "!=", "&&", "||"
Method Detail

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 argument
a2 - 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()