cz.cuni.amis.utils.collections
Class ObservableList<E>

Package class diagram package ObservableList
java.lang.Object
  extended by cz.cuni.amis.utils.collections.ObservableCollection<E>
      extended by cz.cuni.amis.utils.collections.ObservableList<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>
Direct Known Subclasses:
TranslatedObservableCollection

public class ObservableList<E>
extends ObservableCollection<E>
implements List<E>

Wrapper for the Lists adding events notification.

Author:
Ik

Field Summary
protected  List<E> l
           
 
Fields inherited from class cz.cuni.amis.utils.collections.ObservableCollection
col, eventListeners
 
Constructor Summary
ObservableList(List<E> list)
           
 
Method Summary
 void add(int index, E element)
           
 boolean addAll(Collection<? extends E> c)
           
 boolean addAll(int index, Collection<? extends E> c)
           
 void clear()
           
 E get(int index)
           
 List<E> getList()
          Returns the wrapped List instance.
 int indexOf(Object o)
           
 int lastIndexOf(Object o)
           
 ListIterator<E> listIterator()
           
 ListIterator<E> listIterator(int index)
           
 E remove(int index)
           
 E set(int index, E element)
           
 List<E> subList(int fromIndex, int toIndex)
           
 
Methods inherited from class cz.cuni.amis.utils.collections.ObservableCollection
add, addCollectionListener, contains, containsAll, isEmpty, iterator, notifyPostAdd, notifyPostRemove, notifyPreAdd, notifyPreRemove, remove, removeAll, removeCollectionListener, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
add, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

l

protected List<E> l
Constructor Detail

ObservableList

public ObservableList(List<E> list)
Method Detail

getList

public List<E> getList()
Returns the wrapped List instance.

Returns:

addAll

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

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>
Overrides:
addAll in class ObservableCollection<E>

clear

public void clear()
Specified by:
clear in interface Collection<E>
Specified by:
clear in interface List<E>
Overrides:
clear in class ObservableCollection<E>

get

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

set

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

add

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

remove

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

indexOf

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

lastIndexOf

public int lastIndexOf(Object o)
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 fromIndex,
                       int toIndex)
Specified by:
subList in interface List<E>


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.