JBBPFieldBit extends JBBPAbstractField implements JBBPNumericField, BitEntity { @Override public boolean getAsBool() { return this.value != 0; } JBBPFieldBit(final JBBPNamedFieldInfo name, final int value, final JBBPBitNumber bitNumber); static long reverseBits(final byte value, final JBBPBitNumber bits); @Override JBBPBitNumber getBitWidth(); @Override double getAsDouble(); @Override float getAsFloat(); @Override int getAsInt(); @Override long getAsLong(); @Override boolean getAsBool(); @Override long getAsInvertedBitOrder(); @Override String getTypeAsString();  }
@Test public void testgetAsBool_True() { assertTrue(new JBBPFieldBit(new JBBPNamedFieldInfo("test.field", "field", 123), 123, JBBPBitNumber.BITS_1).getAsBool()); }
@Test public void testgetAsBool_False() { assertFalse(new JBBPFieldBit(new JBBPNamedFieldInfo("test.field", "field", 123), 0, JBBPBitNumber.BITS_1).getAsBool()); }