coins.aflow.util
Class CoinsList.SubList

java.lang.Object
  extended bycoins.aflow.util.CoinsList
      extended bycoins.aflow.util.CoinsList.SubList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List
Enclosing class:
CoinsList

class CoinsList.SubList
extends CoinsList


Nested Class Summary
 
Nested classes inherited from class coins.aflow.util.CoinsList
CoinsList.Entry, CoinsList.Itr, CoinsList.SubList
 
Field Summary
 
Fields inherited from class coins.aflow.util.CoinsList
fIterators, header, modCount
 
Constructor Summary
(package private) CoinsList.SubList(CoinsList list, int fromIndex, int toIndex)
           
 
Method Summary
 void add(int index, java.lang.Object element)
          Inserts the specified element at the specified position in this list.
 boolean addAll(java.util.Collection c)
          Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
 boolean addAll(int index, java.util.Collection c)
          Inserts all of the elements in the specified collection into this list, starting at the specified position.
 java.lang.Object get(int index)
          Returns the element at the specified position in this list.
 java.util.Iterator iterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
          Removes the element at the specified position in this list.
 java.lang.Object set(int index, java.lang.Object element)
          Replaces the element at the specified position in this list with the specified element.
 int size()
          Returns the number of elements in this list.
 java.util.List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class coins.aflow.util.CoinsList
add, addBefore, addFirst, addLast, clear, clone, coinsIterator, coinsIterator, contains, containsAll, entry, equals, getFirst, getLast, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, notifyIteratorsOfAddition, notifyIteratorsOfClearance, notifyIteratorsOfRemoval, remove, remove, removeAll, removeFirst, removeLast, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoinsList.SubList

CoinsList.SubList(CoinsList list,
                  int fromIndex,
                  int toIndex)
Method Detail

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Description copied from class: CoinsList
Replaces the element at the specified position in this list with the specified element.

Specified by:
set in interface java.util.List
Overrides:
set in class CoinsList
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.

get

public java.lang.Object get(int index)
Description copied from class: CoinsList
Returns the element at the specified position in this list.

Specified by:
get in interface java.util.List
Overrides:
get in class CoinsList
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.

size

public int size()
Description copied from class: CoinsList
Returns the number of elements in this list.

Specified by:
size in interface java.util.List
Overrides:
size in class CoinsList
Returns:
the number of elements in this list.

add

public void add(int index,
                java.lang.Object element)
Description copied from class: CoinsList
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Specified by:
add in interface java.util.List
Overrides:
add in class CoinsList
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.

remove

public java.lang.Object remove(int index)
Description copied from class: CoinsList
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Specified by:
remove in interface java.util.List
Overrides:
remove in class CoinsList
Parameters:
index - the index of the element to removed.
Returns:
the element previously at the specified position.

addAll

public boolean addAll(java.util.Collection c)
Description copied from class: CoinsList
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)

Specified by:
addAll in interface java.util.List
Overrides:
addAll in class CoinsList
Parameters:
c - the elements to be inserted into this list.

addAll

public boolean addAll(int index,
                      java.util.Collection c)
Description copied from class: CoinsList
Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator.

Specified by:
addAll in interface java.util.List
Overrides:
addAll in class CoinsList
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.List
Overrides:
iterator in class CoinsList

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class CoinsList

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List
Overrides:
subList in class CoinsList