Method from java.util.Collections$CheckedList Detail: |
public void add(int index,
E element) {
typeCheck(element);
list.add(index, element);
}
|
public boolean addAll(int index,
Collection<? extends E> c) {
return list.addAll(index, checkedCopyOf(c));
}
|
public boolean equals(Object o) {
return o == this || list.equals(o);
}
|
public E get(int index) {
return list.get(index);
}
|
public int hashCode() {
return list.hashCode();
}
|
public int indexOf(Object o) {
return list.indexOf(o);
}
|
public int lastIndexOf(Object o) {
return list.lastIndexOf(o);
}
|
public ListIterator<E> listIterator() {
return listIterator(0);
}
|
public ListIterator<E> listIterator(int index) {
final ListIterator< E > i = list.listIterator(index);
return new ListIterator< E >() {
public boolean hasNext() { return i.hasNext(); }
public E next() { return i.next(); }
public boolean hasPrevious() { return i.hasPrevious(); }
public E previous() { return i.previous(); }
public int nextIndex() { return i.nextIndex(); }
public int previousIndex() { return i.previousIndex(); }
public void remove() { i.remove(); }
public void set(E e) {
typeCheck(e);
i.set(e);
}
public void add(E e) {
typeCheck(e);
i.add(e);
}
};
}
|
public E remove(int index) {
return list.remove(index);
}
|
public E set(int index,
E element) {
typeCheck(element);
return list.set(index, element);
}
|
public List<E> subList(int fromIndex,
int toIndex) {
return new CheckedList< >(list.subList(fromIndex, toIndex), type);
}
|