| org.archive.util.SubList
SubList | public class SubList extends AbstractList implements Serializable(Code) | | Universal sublist implementation. Instances of this class are
appropriate to return from
List.subList(intint)
implementations.
This implementation is efficient if the super list is random-access.
LinkedList-style super lists should subclass this and provide a custom
iterator.
author: pjack< Parameters: E - > the element type of the list |
Constructor Summary | |
public | SubList(List<E> delegate, int start, int end) Constructor. |
Method Summary | |
public void | add(int index, E value) | public E | get(int index) | public E | remove(int index) | public E | set(int index, E value) | public int | size() |
SubList | public SubList(List<E> delegate, int start, int end)(Code) | | Constructor.
Parameters: delegate - the list that create this SubList Parameters: start - the starting index of the sublist, inclusive Parameters: end - the ending index of the sublist, exclusive throws: IndexOutOfBoundsException - if start or end are outside thebounds of the list throws: IllegalArgumentException - if end is less than start |
add | public void add(int index, E value)(Code) | | |
get | public E get(int index)(Code) | | |
remove | public E remove(int index)(Code) | | |
set | public E set(int index, E value)(Code) | | |
|
|