JBBPFieldInt extends JBBPAbstractField implements JBBPNumericField { @Override public long getAsInvertedBitOrder() { return reverseBits(this.value); } JBBPFieldInt(final JBBPNamedFieldInfo name, final int value); static long reverseBits(final int value); @Override int getAsInt(); @Override double getAsDouble(); @Override float getAsFloat(); @Override long getAsLong(); @Override boolean getAsBool(); @Override long getAsInvertedBitOrder(); @Override String getTypeAsString();  }
@Test public void testGetAsInvertedBitOrder() { assertEquals(0x0000000020C04080L, new JBBPFieldInt(new JBBPNamedFieldInfo("test.field", "field", 123), 0x01020304).getAsInvertedBitOrder()); assertEquals(0x000000007FFFFFFFL, new JBBPFieldInt(new JBBPNamedFieldInfo("test.field", "field", 123), 0xFFFFFFFE).getAsInvertedBitOrder()); assertEquals(0xFFFFFFFF80000000L, new JBBPFieldInt(new JBBPNamedFieldInfo("test.field", "field", 123), 0x00000001).getAsInvertedBitOrder()); }