cz.cuni.amis.utils.collections
Class ObservableList<E>
java.lang.Object
cz.cuni.amis.utils.collections.ObservableCollection<E>
cz.cuni.amis.utils.collections.ObservableList<E>
- Type Parameters:
E
-
- All Implemented Interfaces:
- java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
- Direct Known Subclasses:
- TranslatedObservableCollection
public class ObservableList<E>
- extends ObservableCollection<E>
- implements java.util.List<E>
Wrapper for the Lists adding events notification.
Field Summary |
protected java.util.List<E> |
l
|
Method Summary |
void |
add(int index,
E element)
|
boolean |
addAll(java.util.Collection<? extends E> c)
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c)
|
void |
clear()
|
E |
get(int index)
|
java.util.List<E> |
getList()
Returns the wrapped List instance. |
int |
indexOf(java.lang.Object o)
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator<E> |
listIterator()
|
java.util.ListIterator<E> |
listIterator(int index)
|
E |
remove(int index)
|
E |
set(int index,
E element)
|
java.util.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 |
l
protected java.util.List<E> l
ObservableList
public ObservableList(java.util.List<E> list)
getList
public java.util.List<E> getList()
- Returns the wrapped List instance.
- Returns:
addAll
public boolean addAll(int index,
java.util.Collection<? extends E> c)
- Specified by:
addAll
in interface java.util.List<E>
addAll
public boolean addAll(java.util.Collection<? extends E> c)
- Specified by:
addAll
in interface java.util.Collection<E>
- Specified by:
addAll
in interface java.util.List<E>
- Overrides:
addAll
in class ObservableCollection<E>
clear
public void clear()
- Specified by:
clear
in interface java.util.Collection<E>
- Specified by:
clear
in interface java.util.List<E>
- Overrides:
clear
in class ObservableCollection<E>
get
public E get(int index)
- Specified by:
get
in interface java.util.List<E>
set
public E set(int index,
E element)
- Specified by:
set
in interface java.util.List<E>
add
public void add(int index,
E element)
- Specified by:
add
in interface java.util.List<E>
remove
public E remove(int index)
- Specified by:
remove
in interface java.util.List<E>
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf
in interface java.util.List<E>
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf
in interface java.util.List<E>
listIterator
public java.util.ListIterator<E> listIterator()
- Specified by:
listIterator
in interface java.util.List<E>
listIterator
public java.util.ListIterator<E> listIterator(int index)
- Specified by:
listIterator
in interface java.util.List<E>
subList
public java.util.List<E> subList(int fromIndex,
int toIndex)
- Specified by:
subList
in interface java.util.List<E>