com.singularsys.jep.functions
Class Logical
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.BinaryFunction
com.singularsys.jep.functions.Logical
- All Implemented Interfaces:
- PostfixMathCommandI, java.io.Serializable
public class Logical
- extends BinaryFunction
Logical operators AND and OR. No longer used by default after having added
LazyLogical in Jep 3.1.0.
- See Also:
- Serialized Form
Constructor Summary |
Logical(int id_in)
Standard constructor, allows Boolean and Number arguments |
Logical(int id,
boolean disallowNumbers)
Constructor which restricts type of arguments. |
Method Summary |
java.lang.Object |
eval(java.lang.Object l,
java.lang.Object r)
|
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand |
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AND
public static final int AND
- See Also:
- Constant Field Values
OR
public static final int OR
- See Also:
- Constant Field Values
allowNumbers
protected boolean allowNumbers
Logical
public Logical(int id_in)
- Standard constructor, allows Boolean and Number arguments
- Parameters:
id_in
- either of the constants AND or OR
Logical
public Logical(int id,
boolean disallowNumbers)
- Constructor which restricts type of arguments.
- Parameters:
id
- either of the constants AND or ORdisallowNumbers
- if true Number arguments will raise exceptions, otherwise as thee Standard constructor.
eval
public java.lang.Object eval(java.lang.Object l,
java.lang.Object r)
throws EvaluationException
- Specified by:
eval
in class BinaryFunction
- Throws:
EvaluationException
Copyright © 2010 Singular Systems http://www.singularsys.com/jep