JBBPFieldArrayBoolean extends JBBPAbstractArrayField<JBBPFieldBoolean> implements JBBPNumericArray { @Override public Object getValueArrayAsObject(final boolean reverseBits) { return this.array.clone(); } JBBPFieldArrayBoolean(final JBBPNamedFieldInfo name, final boolean[] array); boolean[] getArray(); @Override int size(); @Override JBBPFieldBoolean getElementAt(final int index); @Override int getAsInt(final int index); @Override long getAsLong(final int index); @Override boolean getAsBool(final int index); @Override Object getValueArrayAsObject(final boolean reverseBits); @Override String getTypeAsString();  }
@Test public void testGetValueArrayAsObject() { final boolean[] noninverted = (boolean[]) test.getValueArrayAsObject(false); assertEquals(array.length, noninverted.length); for (int i = 0; i < array.length; i++) { assertTrue(array[i] == noninverted[i]); } final boolean[] inverted = (boolean[]) test.getValueArrayAsObject(true); assertEquals(array.length, inverted.length); for (int i = 0; i < array.length; i++) { assertEquals(JBBPFieldBoolean.reverseBits(array[i]) != 0L, inverted[i]); } }