FastFullList implements Iterable<E> { public E get(final int index) { if (index < this.size) { return this.arr[index]; } else { return this.blankElement; } } @SuppressWarnings("unchecked")  FastFullList(final int capacity, final E blankElement); static FastFullList<F> newListWithCapacity(final int capacity); static FastFullListBuilder<F> builder(); static FastFullList<F> newList(final F... elements); int usedSize(); void set(final int index, final E element); E get(final int index); List<E> subList(final int fromIndex, final int toIndex); @Override Iterator<E> iterator();  }
@Test public final void testGet() { final FastFullList<String> fl = FastFullList.<String>builder().build(); Assert.assertNull(fl.get(10)); Assert.assertEquals(0, fl.usedSize()); }