@Test public void testLastIndexOf() throws Exception { String[] strings = new String[] { "a", "b", "c", null, "a", "b", "c", "d" }; List<Object> list = new TypedList(stringListType, strings); assertEquals(4, list.lastIndexOf("a")); assertEquals(5, list.lastIndexOf("b")); assertEquals(6, list.lastIndexOf("c")); assertEquals(3, list.lastIndexOf(null)); assertEquals(7, list.lastIndexOf("d")); assertEquals(-1, list.lastIndexOf("e")); }
public int lastIndexOf(Object o) { return inner.lastIndexOf(o); }
TypedList implements List<Object> { public int lastIndexOf(Object o) { return inner.lastIndexOf(o); } }
TypedList implements List<Object> { public int lastIndexOf(Object o) { return inner.lastIndexOf(o); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); }
TypedList implements List<Object> { public int lastIndexOf(Object o) { return inner.lastIndexOf(o); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); ListType getType(); Type getElementType(); void add(int index, Object element); boolean add(Object o); boolean addAll(Collection<? extends Object> c); boolean addAll(int index, Collection<? extends Object> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); Object get(int index); int indexOf(Object o); boolean isEmpty(); Iterator<Object> iterator(); int lastIndexOf(Object o); ListIterator<Object> listIterator(); ListIterator<Object> listIterator(int index); Object remove(int index); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); Object set(int index, Object element); int size(); List<Object> subList(int fromIndex, int toIndex); Object[] toArray(); T[] toArray(T[] a); @Override int hashCode(); @Override boolean equals(Object obj); }
TypedList implements List<Object> { public int lastIndexOf(Object o) { return inner.lastIndexOf(o); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); ListType getType(); Type getElementType(); void add(int index, Object element); boolean add(Object o); boolean addAll(Collection<? extends Object> c); boolean addAll(int index, Collection<? extends Object> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); Object get(int index); int indexOf(Object o); boolean isEmpty(); Iterator<Object> iterator(); int lastIndexOf(Object o); ListIterator<Object> listIterator(); ListIterator<Object> listIterator(int index); Object remove(int index); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); Object set(int index, Object element); int size(); List<Object> subList(int fromIndex, int toIndex); Object[] toArray(); T[] toArray(T[] a); @Override int hashCode(); @Override boolean equals(Object obj);  }