Orbital library

orbital.util
Class DelegateList

java.lang.Object
  extended by orbital.util.DelegateCollection
      extended by orbital.util.DelegateList
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List
Direct Known Subclasses:
Gene.List, QueuedIterator

public class DelegateList
extends DelegateCollection
implements java.util.List

A DelegateList that works as a delegator to lists.

This class simply implements List and extends DelegateCollection, since a DelegateCollection can also be used as a delegate for Lists due to the identical interfaces differing only by semantics.

Author:
André Platzer
See Also:
Serialized Form

Constructor Summary
protected DelegateList(java.util.List delegatee)
          Extend to create a List delegating to an implementation List.
 
Method Summary
 void add(int index, java.lang.Object element)
           
 boolean addAll(int index, java.util.Collection c)
           
 java.lang.Object get(int index)
           
 int indexOf(java.lang.Object o)
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object element)
           
protected  void setDelegatee(java.util.Collection delegatee)
          Set the delegatee Collection to which operations are delegated.
protected  void setDelegatee(java.util.List delegatee)
           
 java.util.List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class orbital.util.DelegateCollection
add, addAll, clear, contains, containsAll, equals, getDelegatee, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

DelegateList

protected DelegateList(java.util.List delegatee)
Extend to create a List delegating to an implementation List.

Parameters:
delegatee - the implementation-List to that List operations are delegated.
Method Detail

setDelegatee

protected void setDelegatee(java.util.List delegatee)

setDelegatee

protected void setDelegatee(java.util.Collection delegatee)
Description copied from class: DelegateCollection
Set the delegatee Collection to which operations are delegated.

Overrides:
setDelegatee in class DelegateCollection
Parameters:
delegatee - the implementation-Collection that Collection operations are delegated to.

add

public void add(int index,
                java.lang.Object element)
Specified by:
add in interface java.util.List

addAll

public boolean addAll(int index,
                      java.util.Collection c)
Specified by:
addAll in interface java.util.List

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List

listIterator

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

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface java.util.List

subList

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

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.