@Test public void testSetIndexNegative() { PreAllocatedArray<String> strings = new PreAllocatedArray<>(3); strings.set(0, "in bounds"); assertThrows(IndexOutOfBoundsException.class, () -> strings.set(-3, "out of bounds")); }
public T set(final int index, final T element) { return internal.set(index, element); }
PreAllocatedArray implements Iterable<T> { public T set(final int index, final T element) { return internal.set(index, element); } }
PreAllocatedArray implements Iterable<T> { public T set(final int index, final T element) { return internal.set(index, element); } PreAllocatedArray(final int capacity); }
PreAllocatedArray implements Iterable<T> { public T set(final int index, final T element) { return internal.set(index, element); } PreAllocatedArray(final int capacity); T set(final int index, final T element); T get(final int index); @Override Iterator<T> iterator(); }
PreAllocatedArray implements Iterable<T> { public T set(final int index, final T element) { return internal.set(index, element); } PreAllocatedArray(final int capacity); T set(final int index, final T element); T get(final int index); @Override Iterator<T> iterator(); final int length; }