@Test public void testGoodAddAll() throws Exception { BoundedArrayList<Object> list = new BoundedArrayList<>( 1 ); list.addAll( ImmutableList.of( new Object() ) ); }
@Override public boolean addAll(Collection<? extends E> c) { checkSize( c.size() ); return super.addAll( c ); }
BoundedArrayList extends ArrayList<E> { @Override public boolean addAll(Collection<? extends E> c) { checkSize( c.size() ); return super.addAll( c ); } }
BoundedArrayList extends ArrayList<E> { @Override public boolean addAll(Collection<? extends E> c) { checkSize( c.size() ); return super.addAll( c ); } BoundedArrayList(int maxSize); }
BoundedArrayList extends ArrayList<E> { @Override public boolean addAll(Collection<? extends E> c) { checkSize( c.size() ); return super.addAll( c ); } BoundedArrayList(int maxSize); @Override boolean add(E e); @Override void add(int index, E element); @Override boolean addAll(Collection<? extends E> c); @Override boolean addAll(int index, Collection<? extends E> c); }
BoundedArrayList extends ArrayList<E> { @Override public boolean addAll(Collection<? extends E> c) { checkSize( c.size() ); return super.addAll( c ); } BoundedArrayList(int maxSize); @Override boolean add(E e); @Override void add(int index, E element); @Override boolean addAll(Collection<? extends E> c); @Override boolean addAll(int index, Collection<? extends E> c);  }