@Test public void whenHasNextInEmptyArrayListThenResultFalse() { MyArrayList list = new MyArrayList(2); Iterator itr = list.iterator(); assertThat(itr.hasNext(), is(false)); }
@Override public Iterator<E> iterator() { return new Itr(); }
MyArrayList implements SimpleContainer<E> { @Override public Iterator<E> iterator() { return new Itr(); } }
MyArrayList implements SimpleContainer<E> { @Override public Iterator<E> iterator() { return new Itr(); } MyArrayList();  MyArrayList(int initialCapacity); }
MyArrayList implements SimpleContainer<E> { @Override public Iterator<E> iterator() { return new Itr(); } MyArrayList();  MyArrayList(int initialCapacity); @Override E get(int index); @Override void add(E e); @Override Iterator<E> iterator(); int length(); }
MyArrayList implements SimpleContainer<E> { @Override public Iterator<E> iterator() { return new Itr(); } MyArrayList();  MyArrayList(int initialCapacity); @Override E get(int index); @Override void add(E e); @Override Iterator<E> iterator(); int length();  }