au.com.zip.cs
Class ListSubRangeView
java.lang.Object
au.com.zip.cs.AgnosticList
au.com.zip.cs.ListSubRangeView
- All Implemented Interfaces:
- Iterable, Collection, List
public class ListSubRangeView
- extends AgnosticList
A List that is a subrange view of another List.
This exists to implement List.subList(int,int).
- Author:
- Cameron Simpson <cs@zip.com.au> 31jul2003
|
Constructor Summary |
ListSubRangeView(List list,
int fromIndex,
int toIndex)
Construct a ListSubRange from a source List and some bounds. |
| Methods inherited from class au.com.zip.cs.AgnosticList |
addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
ListSubRangeView
public ListSubRangeView(List list,
int fromIndex,
int toIndex)
- Construct a ListSubRange from a source
List and some bounds.
- Parameters:
list - the source ListfromIndex - the first element in the source ListtoIndex - one past the last element in the source List
add
public void add(int index,
Object element)
add
public boolean add(Object o)
set
public Object set(int index,
Object o)
iterator
public Iterator iterator()
remove
public Object remove(int index)
size
public int size()