Package com.singularsys.jep.misc.bitwise


package com.singularsys.jep.misc.bitwise
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.