The list of methods to do Bit Shift are organized into topic(s).
int
shift(int a, int b) shift
if ((0 < b) && (b < 32)) {
return a << b;
} else if ((-32 < b) && (b < 0)) {
return a >> (-b);
} else if (b == 0) {
return a;
} else if (b >= 32) {
return 0;
...
int
shift(int length) shift
int shift = 1;
int shifted = 2;
while (shifted <= length) {
++shift;
shifted <<= 1;
return shift;
String
shift(String string) shift
StringBuilder builder = new StringBuilder();
final String[] strings = string.split("\n");
for (String s : strings) {
builder.append(" ").append(s).append("\n");
return builder.toString();
byte
shiftBits(byte b) shift Bits
int upper = b << 4 & b1;
int lower = b >> 4 & b2;
return (byte) (upper | lower);
int
shiftHorizontally(int inkX, int inkXWidth, int textWidth) Returns a shift of 'x' coordinate in pixels in order to fit the logical extent horizontally
if ((inkX < 0) && (inkXWidth <= textWidth)) {
return inkX;
if ((inkX + inkXWidth > textWidth) && (inkXWidth <= textWidth)) {
return (inkX + inkXWidth - textWidth);
return 0;