Class BitShifter
java.lang.Object
net.messagevortex.router.operation.BitShifter
Shifts bits circularly.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BitShifter
public BitShifter()
-
-
Method Details
-
rshift
public static int rshift(int value, int shift, byte length) shifts bits circularly right.
- Parameters:
value- the value to be shiftedshift- the number of positions to be shiftedlength- the length of the circular buffer- Returns:
- the new value
-
lshift
public static int lshift(int value, int shift, byte length) shifts bits circularly left.
- Parameters:
value- the value to be shiftedshift- the number of positions to be shiftedlength- the length of the circular buffer- Returns:
- the new value
-