net.sf.jbaobab.expirable
Class ExpirableList<E>

java.lang.Object
  extended by net.sf.jbaobab.expirable.AbstractExpirableCollection<E>
      extended by net.sf.jbaobab.expirable.ExpirableCollection<E>
          extended by net.sf.jbaobab.expirable.ExpirableList<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>

public class ExpirableList<E>
extends ExpirableCollection<E>
implements List<E>

An expirable decorator for a List.

Author:
Oakyoon Cha

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jbaobab.expirable.ExpirableCollection
ExpirableCollection.InternalRemoverImpl<E>
 
Field Summary
 
Fields inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
expirer, remover, timeout
 
Constructor Summary
ExpirableList(List<E> list)
           
ExpirableList(List<E> list, long timeout)
           
 
Method Summary
 void add(int index, E element)
           
 void add(int index, E element, long timeout)
           
 boolean addAll(int index, Collection<? extends E> collection)
           
 E get(int index)
           
 int indexOf(Object object)
           
 int lastIndexOf(Object object)
           
 ListIterator<E> listIterator()
           
 ListIterator<E> listIterator(int index)
           
 E remove(int index)
           
 E set(int index, E element)
           
 E set(int index, E element, long timeout)
           
 List<E> subList(int from, int to)
           
 
Methods inherited from class net.sf.jbaobab.expirable.ExpirableCollection
add, add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
finalize, getHandler, setHandler, timeout, timeout
 
Methods inherited from class java.lang.Object
clone, 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

ExpirableList

public ExpirableList(List<E> list,
                     long timeout)

ExpirableList

public ExpirableList(List<E> list)
Method Detail

addAll

public boolean addAll(int index,
                      Collection<? extends E> collection)
Specified by:
addAll in interface List<E>

set

public E set(int index,
             E element,
             long timeout)

set

public E set(int index,
             E element)
Specified by:
set in interface List<E>

add

public void add(int index,
                E element,
                long timeout)

add

public void add(int index,
                E element)
Specified by:
add in interface List<E>

get

public E get(int index)
Specified by:
get in interface List<E>

remove

public E remove(int index)
Specified by:
remove in interface List<E>

indexOf

public int indexOf(Object object)
Specified by:
indexOf in interface List<E>

lastIndexOf

public int lastIndexOf(Object object)
Specified by:
lastIndexOf in interface List<E>

listIterator

public ListIterator<E> listIterator()
Specified by:
listIterator in interface List<E>

listIterator

public ListIterator<E> listIterator(int index)
Specified by:
listIterator in interface List<E>

subList

public List<E> subList(int from,
                       int to)
Specified by:
subList in interface List<E>