@Test public void testGetSizeForSzx() { assertThat(BlockOption.szx2Size(-1), is(16)); assertThat(BlockOption.szx2Size(0), is(16)); assertThat(BlockOption.szx2Size(1), is(32)); assertThat(BlockOption.szx2Size(2), is(64)); assertThat(BlockOption.szx2Size(3), is(128)); assertThat(BlockOption.szx2Size(4), is(256)); assertThat(BlockOption.szx2Size(5), is(512)); assertThat(BlockOption.szx2Size(6), is(1024)); assertThat(BlockOption.szx2Size(8), is(1024)); }
public static int szx2Size(final int szx) { if (szx <= 0) { return 16; } else if (szx >= 6) { return 1024; } else { return 1 << (szx + 4); } }
BlockOption { public static int szx2Size(final int szx) { if (szx <= 0) { return 16; } else if (szx >= 6) { return 1024; } else { return 1 << (szx + 4); } } }
BlockOption { public static int szx2Size(final int szx) { if (szx <= 0) { return 16; } else if (szx >= 6) { return 1024; } else { return 1 << (szx + 4); } } BlockOption(final int szx, final boolean m, final int num);  BlockOption(final BlockOption origin);  BlockOption(final byte[] value); }
BlockOption { public static int szx2Size(final int szx) { if (szx <= 0) { return 16; } else if (szx >= 6) { return 1024; } else { return 1 << (szx + 4); } } BlockOption(final int szx, final boolean m, final int num);  BlockOption(final BlockOption origin);  BlockOption(final byte[] value); int getSzx(); int getSize(); boolean isM(); int getNum(); byte[] getValue(); int getOffset(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); static int size2Szx(int blockSize); static int szx2Size(final int szx); }
BlockOption { public static int szx2Size(final int szx) { if (szx <= 0) { return 16; } else if (szx >= 6) { return 1024; } else { return 1 << (szx + 4); } } BlockOption(final int szx, final boolean m, final int num);  BlockOption(final BlockOption origin);  BlockOption(final byte[] value); int getSzx(); int getSize(); boolean isM(); int getNum(); byte[] getValue(); int getOffset(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); static int size2Szx(int blockSize); static int szx2Size(final int szx);  }