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.
-
ClassDescriptionBitwise And, like the java
a & b
operator.Unary bitwise complement, like the java ~a operator.Bitwise Or, like the java a | b operator.An operator table with a selection of bitwise operators.Bitwise Xor, like the java a ^ b operator.Bitwise Left shift, like the java a << b operator.Bitwise right shift with sign extension, like the java a >> b operator.Bitwise right shift with zero extension, like the java a <<< b operator.