au.com.zip.cs
Class ListSubRangeView

java.lang.Object
  extended by au.com.zip.cs.AgnosticList
      extended by 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.
 
Method Summary
 void add(int index, Object element)
           
 boolean add(Object o)
           
 Iterator iterator()
           
 Object remove(int index)
           
 Object set(int index, Object o)
           
 int size()
           
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSubRangeView

public ListSubRangeView(List list,
                        int fromIndex,
                        int toIndex)
Construct a ListSubRange from a source List and some bounds.

Parameters:
list - the source List
fromIndex - the first element in the source List
toIndex - one past the last element in the source List
Method Detail

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()