com.singularsys.jep.misc.bitwise

## Class BitwiseOperatorTable

- java.lang.Object
- - com.singularsys.jep.EmptyOperatorTable
  - - com.singularsys.jep.OperatorTable2
    - - com.singularsys.jep.standard.StandardOperatorTable2
      - - com.singularsys.jep.misc.bitwise.BitwiseOperatorTable

- All Implemented Interfaces:
    JepComponent, OperatorTableI, java.io.Serializable
  Direct Known Subclasses:
    JavaOperatorTable

      public class BitwiseOperatorTable
      extends StandardOperatorTable2

  An operator table with a selection of bitwise operators.

  - And: a & b
  - Or: a | b
  - Complement: ~a
  - Xor: a ^ b
  - Left shift: a >> b
  - Right shift: a << b
  - Right shift with zero extension: a <<< b

  The BitwiseOperatorTable can be used as a drop in replacement for the StandardOperatorTable.

      jep.setComponent(new BitwiseOperatorTable("**","^"));

  Note the standard symbol used for power ^ conflicts with java's symbol used for xor, the constructor for the BitwiseOperatorTable takes two strings specifying the symbols used for power and xor respectively.

  Author:
    Richard Morris
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BitwiseOperatorTable.BitwiseOperators`

    - ### Nested classes/interfaces inherited from class com.singularsys.jep.OperatorTable2

      `OperatorTable2.BasicOperators, OperatorTable2.PsudoOperators, OperatorTable2.SpecialOperators`

    - ### Nested classes/interfaces inherited from class com.singularsys.jep.EmptyOperatorTable

      `EmptyOperatorTable.OperatorKey`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitwiseOperatorTable(OperatorTable2 oldTable, java.lang.String powerSymbol, java.lang.String xorSymbol)` A decerator constructor.
    `BitwiseOperatorTable(java.lang.String powerSymbol, java.lang.String xorSymbol)` Standard constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addBitOperators(java.lang.String powerSymbol, java.lang.String xorSymbol)`
    `Operator` | `getBitAnd()`
    `Operator` | `getBitComp()`
    `Operator` | `getBitOr()`
    `Operator` | `getBitXor()`
    `Operator` | `getLShift()`
    `Operator` | `getRShift()`
    `Operator` | `getURShift()`
    `protected void` | `setBasicPfmcs()` A do nothing implementation.
    `protected void` | `setBitPfmcs()`
    `protected void` | `setPsudoPfmcs()` A do nothing implementation.
    `protected void` | `setSpecialPfmcs()` A do nothing implementation.

    - ### Methods inherited from class com.singularsys.jep.OperatorTable2

      `getAdd, getAnd, getAssign, getCross, getDivide, getDot, getEle, getEQ, getGE, getGT, getLE, getList, getLT, getMod, getMultiply, getNE, getNop, getNot, getOr, getPower, getRange, getSubtract, getUDivide, getUMinus, getUPlus`

    - ### Methods inherited from class com.singularsys.jep.EmptyOperatorTable

      `addOperator, addOperator, appendOperator, entrySet, getKey, getLightWeightInstance, getNumOps, getOperator, getOperators, getOperatorsByName, getOperatorsBySymbol, init, insertOperator, keySet, removeOperator, removeOperator, replaceOperator, replaceOperator, setBinaryInverseOp, setDistributiveOver, setGroupOperatorRelations, setGroupOperatorRelations, setInverseOp, setPrecedenceTable, setRootOp, setStandardOperatorRelations, toString`

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

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

- - ### Constructor Detail

    - #### BitwiseOperatorTable

          public BitwiseOperatorTable(java.lang.String powerSymbol,
                                      java.lang.String xorSymbol)

      Standard constructor.
      Parameters:
        `powerSymbol` - string used to represent power.
        `xorSymbol` - string used to represent xor.

    - #### BitwiseOperatorTable

          public BitwiseOperatorTable(OperatorTable2 oldTable,
                                      java.lang.String powerSymbol,
                                      java.lang.String xorSymbol)

      A decerator constructor. Takes all the operators suplied in the oldTable and add extra bitwise operations.
      Parameters:
        `oldTable` - table with most operators.
        `powerSymbol` - string used to represent power.
        `xorSymbol` - string used to represent xor.

  - ### Method Detail

    - #### setBasicPfmcs

          protected void setBasicPfmcs()

      A do nothing implementation.
      Overrides:
        `setBasicPfmcs` in class `StandardOperatorTable2`
      See Also:
        `OperatorTable2.BasicOperators`

    - #### setSpecialPfmcs

          protected void setSpecialPfmcs()

      A do nothing implementation.
      Overrides:
        `setSpecialPfmcs` in class `StandardOperatorTable2`
      See Also:
        `OperatorTable2.SpecialOperators`

    - #### setPsudoPfmcs

          protected void setPsudoPfmcs()

      A do nothing implementation.
      Overrides:
        `setPsudoPfmcs` in class `StandardOperatorTable2`

    - #### addBitOperators

          protected void addBitOperators(java.lang.String powerSymbol,
                                         java.lang.String xorSymbol)

    - #### setBitPfmcs

          protected void setBitPfmcs()

    - #### getBitAnd

          public Operator getBitAnd()

    - #### getBitOr

          public Operator getBitOr()

    - #### getBitXor

          public Operator getBitXor()

    - #### getBitComp

          public Operator getBitComp()

    - #### getLShift

          public Operator getLShift()

    - #### getRShift

          public Operator getRShift()

    - #### getURShift

          public Operator getURShift()

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