JBBPFieldUByte extends JBBPAbstractField implements JBBPNumericField { @Override public int getAsInt() { return this.value & 0xFF; } JBBPFieldUByte(final JBBPNamedFieldInfo name, final byte value); static long reverseBits(final byte value); @Override double getAsDouble(); @Override float getAsFloat(); @Override int getAsInt(); @Override long getAsLong(); @Override boolean getAsBool(); @Override long getAsInvertedBitOrder(); @Override String getTypeAsString();  }
@Test public void testgetAsInt() { assertEquals(12, new JBBPFieldUByte(new JBBPNamedFieldInfo("test.field", "field", 123), (byte) 12).getAsInt()); assertEquals(-12 & 0xFF, new JBBPFieldUByte(new JBBPNamedFieldInfo("test.field", "field", 123), (byte) -12).getAsInt()); }