JBBPFieldArrayBoolean extends JBBPAbstractArrayField<JBBPFieldBoolean> implements JBBPNumericArray { @Override public boolean getAsBool(final int index) { return this.array[index]; } 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 testGetAsBool() { final boolean[] etalon = new boolean[] {true, false, true, true, false}; for (int i = 0; i < etalon.length; i++) { assertEquals(etalon[i], test.getAsBool(i)); } }
@Test public void testIterable() { final boolean[] etalon = new boolean[] {true, false, true, true, false}; int index = 0; for (final JBBPFieldBoolean f : test) { assertTrue(etalon[index++] == f.getAsBool()); } }