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 and Description
    --- | ---
    `protected boolean` | `allowNumbers`
    `static int` | `AND`
    `static int` | `OR`

    - ### Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand

      `curNumberOfParameters, name, NaN, numberOfParameters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Logical(int id_in)` Standard constructor, allows Boolean and Number arguments
    `Logical(int id, boolean disallowNumbers)` Constructor which restricts type of arguments.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `eval(java.lang.Object l, java.lang.Object r)`

    - ### Methods inherited from class com.singularsys.jep.functions.BinaryFunction

      `run`

    - ### Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand

      `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 OR
        `disallowNumbers` - 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 class `BinaryFunction`
      Throws:
        `EvaluationException`

Copyright © 2018 Singular Systems http://www.singularsys.com/jep