Package 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
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowNumbers
static int
AND
static int
OR
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
eval(java.lang.Object l, java.lang.Object r)
-
Methods inherited from class com.singularsys.jep.functions.BinaryFunction
instanceOf, instanceOf, run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
eval
public java.lang.Object eval(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
eval
in classBinaryFunction
- Throws:
EvaluationException
-
-