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,Serializable
Logical operators
AND and OR. No longer used by default after having added
LazyLogical in Jep 3.1.0.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.BinaryFunction
BinaryFunction.BiFunctionWithException<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final intstatic final intFields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.jep.functions.BinaryFunction
instanceOf, instanceOf, instanceOf, instanceOf, runMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Field Details
-
AND
public static final int AND- See Also:
-
OR
public static final int OR- See Also:
-
allowNumbers
protected boolean allowNumbers
-
-
Constructor Details
-
Logical
public Logical(int id_in) Standard constructor, allows Boolean and Number arguments- Parameters:
id_in- either of the constantsANDorOR.
-
Logical
public Logical(int id, boolean disallowNumbers) Constructor which restricts type of arguments.- Parameters:
id- either of the constantsANDorOR.disallowNumbers- if true Number arguments will raise exceptions, otherwise they are treated like the Standard constructor.
-
-
Method Details
-
eval
Description copied from class:BinaryFunctionEvaluate the function- Specified by:
evalin classBinaryFunction- Parameters:
l- lhs argumentr- rhs argument- Returns:
- the results
- Throws:
EvaluationException- if the function cannot be evaluated.
-
getDescription
Description copied from class:PostfixMathCommandReturn a description of the function from the properties file. The property name is the class name followed by ".description". The property is found using theJepMessagesclass, which can be configured to add additional properties files. IfPostfixMathCommand.setDescription(String)has been called, return the description set by that method instead.- Specified by:
getDescriptionin interfacePostfixMathCommandI- Overrides:
getDescriptionin classPostfixMathCommand- Returns:
- the description of the function
-