@Test public void testIndexOf() { ArrayList list = new ArrayList(); CastorizedList castor = new CastorizedList(list); castor.add(0, new Object()); assertEquals(1, list.size()); assertEquals(list.indexOf(new Object()), castor.indexOf(new Object())); }
@Override public int indexOf(Object o) { return owner.indexOf(o); }
CastorizedList extends AbstractCollection<E> implements List<E> { @Override public int indexOf(Object o) { return owner.indexOf(o); } }
CastorizedList extends AbstractCollection<E> implements List<E> { @Override public int indexOf(Object o) { return owner.indexOf(o); } CastorizedList(List<E> cl); }
CastorizedList extends AbstractCollection<E> implements List<E> { @Override public int indexOf(Object o) { return owner.indexOf(o); } CastorizedList(List<E> cl); @Override Iterator<E> iterator(); @Override int size(); @Override boolean add(E element); @Override void add(int index, E element); @Override boolean addAll(int index, Collection<? extends E> c); @Override E get(int index); @Override int indexOf(Object o); @Override int lastIndexOf(Object o); @Override ListIterator<E> listIterator(); @Override ListIterator<E> listIterator(int index); @Override E remove(int index); @Override E set(int index, E element); @Override List<E> subList(int fromIndex, int toIndex); }
CastorizedList extends AbstractCollection<E> implements List<E> { @Override public int indexOf(Object o) { return owner.indexOf(o); } CastorizedList(List<E> cl); @Override Iterator<E> iterator(); @Override int size(); @Override boolean add(E element); @Override void add(int index, E element); @Override boolean addAll(int index, Collection<? extends E> c); @Override E get(int index); @Override int indexOf(Object o); @Override int lastIndexOf(Object o); @Override ListIterator<E> listIterator(); @Override ListIterator<E> listIterator(int index); @Override E remove(int index); @Override E set(int index, E element); @Override List<E> subList(int fromIndex, int toIndex);  }