Class ObservableCollection<E>
Defines a List implementation which allows to get notification about adding, removing items from it
Inheritance
java.util.AbstractCollection
java.util.AbstractList
ObservableCollection<E>
Namespace:
Assembly: .dll
Syntax
public class ObservableCollection<E> extends ArrayList<E>
Type Parameters
Constructors
ObservableCollection()
Declaration
public ObservableCollection()
ObservableCollection(int capacity)
Declaration
public ObservableCollection(int capacity)
Parameters
Type |
Name |
Description |
int |
capacity |
The initial capacity
|
ObservableCollection(Collection<? extends E> collection)
Creates a new ObservableCollection instance which contains the elements of
the specified collection.
Declaration
public ObservableCollection(Collection<? extends E> collection)
Parameters
Type |
Name |
Description |
Collection<? extends E> |
collection |
The collection with items to add
|
Methods
add(E object)
Declaration
public boolean add(E object)
Parameters
Type |
Name |
Description |
E |
object |
|
Returns
Overrides
add(int location, E object)
Declaration
public void add(int location, E object)
Parameters
Type |
Name |
Description |
int |
location |
|
E |
object |
|
Overrides
addAll(int location, Collection<? extends E> collection)
Declaration
public boolean addAll(int location, Collection<? extends E> collection)
Parameters
Type |
Name |
Description |
int |
location |
|
Collection<? extends E> |
collection |
|
Returns
Overrides
addAll(Collection<? extends E> collection)
Declaration
public boolean addAll(Collection<? extends E> collection)
Parameters
Type |
Name |
Description |
Collection<? extends E> |
collection |
|
Returns
Overrides
addObserver(ICollectionObserver<E> observer)
Declaration
public final void addObserver(ICollectionObserver<E> observer)
Parameters
clear()
Declaration
Overrides
remove(int location)
Declaration
public E remove(int location)
Parameters
Type |
Name |
Description |
int |
location |
|
Returns
Overrides
remove(Object object)
Declaration
public boolean remove(Object object)
Parameters
Type |
Name |
Description |
Object |
object |
|
Returns
Overrides
removeAll(Collection<?> collection)
Declaration
public boolean removeAll(Collection<?> collection)
Parameters
Returns
Overrides
removeObserver(ICollectionObserver<E> observer)
Declaration
public final synchronized void removeObserver(ICollectionObserver<E> observer)
Parameters
removeRange(int fromIndex, int toIndex)
Declaration
protected void removeRange(int fromIndex, int toIndex)
Parameters
Type |
Name |
Description |
int |
fromIndex |
|
int |
toIndex |
|
Overrides
retainAll(Collection<?> collection)
Declaration
public boolean retainAll(Collection<?> collection)
Parameters
Returns
Overrides
set(int location, E object)
Declaration
public E set(int location, E object)
Parameters
Type |
Name |
Description |
int |
location |
|
E |
object |
|
Returns
Overrides
setAll(Collection<? extends E> collection)
Declaration
public boolean setAll(Collection<? extends E> collection)
Parameters
Type |
Name |
Description |
Collection<? extends E> |
collection |
The collection with items to add
|
Returns
Type |
Description |
boolean |
True if operation was successful
|
setAll(List<? extends E> collection, Predicate<? super E> predicate)
Declaration
public boolean setAll(List<? extends E> collection, Predicate<? super E> predicate)
Parameters
Type |
Name |
Description |
List<? extends E> |
collection |
The collection with items to add
|
Predicate<? super E> |
predicate |
The predicate to use when adding items from collection ( if true item will be added, otherwise item will be skipped )
|
Returns
Type |
Description |
boolean |
True if operation was successful
|