@Test public void testBitmapConversion() { for (int i = 0; i < 1000; i++) { byte[] bitmap = TestUtils.getRandomBytes(BITMAP_BYTES); ReorderingWindow window = new ReorderingWindow(0L, bitmap); assertArrayEquals(bitmap, window.getBitmap()); } }
byte[] getBitmap() { byte[] bitmap = new byte[seen.length / 8]; for (int i = 0; i < bitmap.length; i++) { for (int j = 0; j < 8; j++) { if (seen[i * 8 + j]) bitmap[i] |= 128 >> j; } } return bitmap; }
ReorderingWindow { byte[] getBitmap() { byte[] bitmap = new byte[seen.length / 8]; for (int i = 0; i < bitmap.length; i++) { for (int j = 0; j < 8; j++) { if (seen[i * 8 + j]) bitmap[i] |= 128 >> j; } } return bitmap; } }
ReorderingWindow { byte[] getBitmap() { byte[] bitmap = new byte[seen.length / 8]; for (int i = 0; i < bitmap.length; i++) { for (int j = 0; j < 8; j++) { if (seen[i * 8 + j]) bitmap[i] |= 128 >> j; } } return bitmap; } ReorderingWindow(long base, byte[] bitmap); }
ReorderingWindow { byte[] getBitmap() { byte[] bitmap = new byte[seen.length / 8]; for (int i = 0; i < bitmap.length; i++) { for (int j = 0; j < 8; j++) { if (seen[i * 8 + j]) bitmap[i] |= 128 >> j; } } return bitmap; } ReorderingWindow(long base, byte[] bitmap);  }
ReorderingWindow { byte[] getBitmap() { byte[] bitmap = new byte[seen.length / 8]; for (int i = 0; i < bitmap.length; i++) { for (int j = 0; j < 8; j++) { if (seen[i * 8 + j]) bitmap[i] |= 128 >> j; } } return bitmap; } ReorderingWindow(long base, byte[] bitmap);   }