|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.eclipse.core.databinding.observable.list.AbstractObservableList
Subclasses should override at least get(int index) and size().
This class is thread safe. All state accessing methods must be invoked from
the current realm
. Methods for adding and removing
listeners may be invoked from any thread.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
AbstractObservableList()
|
|
AbstractObservableList(Realm realm)
|
Method Summary | |
---|---|
boolean |
add(Object o)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
addChangeListener(IChangeListener listener)
Adds the given change listener to the list of change listeners. |
void |
addListChangeListener(IListChangeListener listener)
Adds the given list change listener to the list of list change listeners. |
void |
addStaleListener(IStaleListener listener)
Adds the given stale listener to the list of stale listeners. |
protected void |
checkRealm()
Asserts that the realm is the current realm. |
boolean |
contains(Object o)
|
boolean |
containsAll(Collection c)
|
void |
dispose()
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects. |
protected abstract int |
doGetSize()
|
boolean |
equals(Object o)
|
protected void |
fireChange()
Fires change event. |
protected void |
fireListChange(ListDiff diff)
|
protected void |
fireStale()
Fires stale event. |
protected void |
firstListenerAdded()
|
Realm |
getRealm()
Returns the realm for this observable. |
int |
hashCode()
|
int |
indexOf(Object o)
|
boolean |
isEmpty()
|
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to change soon. |
Iterator |
iterator()
|
int |
lastIndexOf(Object o)
|
protected void |
lastListenerRemoved()
|
boolean |
remove(Object o)
|
boolean |
removeAll(Collection c)
|
void |
removeChangeListener(IChangeListener listener)
Removes the given change listener from the list of change listeners. |
void |
removeListChangeListener(IListChangeListener listener)
Removes the given list change listener from the list of list change listeners. |
void |
removeStaleListener(IStaleListener listener)
Removes the given stale listener from the list of stale listeners. |
boolean |
retainAll(Collection c)
|
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
Methods inherited from class java.util.AbstractList |
---|
add, clear, get, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.databinding.observable.list.IObservableList |
---|
get, getElementType, listIterator, listIterator, remove, set, subList |
Methods inherited from interface java.util.List |
---|
add, clear |
Constructor Detail |
public AbstractObservableList(Realm realm)
realm
- public AbstractObservableList()
Method Detail |
public boolean isStale()
IObservable
isStale
in interface IObservable
public void addListChangeListener(IListChangeListener listener)
IObservableList
addListChangeListener
in interface IObservableList
listener
- public void removeListChangeListener(IListChangeListener listener)
IObservableList
removeListChangeListener
in interface IObservableList
listener
- protected void fireListChange(ListDiff diff)
public void addChangeListener(IChangeListener listener)
IObservable
addChangeListener
in interface IObservable
listener
- public void removeChangeListener(IChangeListener listener)
IObservable
removeChangeListener
in interface IObservable
listener
- public void addStaleListener(IStaleListener listener)
IObservable
addStaleListener
in interface IObservable
listener
- IObservable.isStale()
public void removeStaleListener(IStaleListener listener)
IObservable
removeStaleListener
in interface IObservable
listener
- protected void fireChange()
protected void fireStale()
protected void firstListenerAdded()
protected void lastListenerRemoved()
public void dispose()
IObservable
dispose
in interface IObservable
public final int size()
size
in interface IObservableList
protected abstract int doGetSize()
public boolean isEmpty()
isEmpty
in interface IObservableList
public boolean contains(Object o)
contains
in interface IObservableList
public Iterator iterator()
iterator
in interface IObservableList
public Object[] toArray()
toArray
in interface IObservableList
public Object[] toArray(Object[] a)
toArray
in interface IObservableList
public boolean add(Object o)
add
in interface IObservableList
public boolean remove(Object o)
remove
in interface IObservableList
public boolean containsAll(Collection c)
containsAll
in interface IObservableList
public boolean addAll(Collection c)
addAll
in interface IObservableList
public boolean addAll(int index, Collection c)
addAll
in interface IObservableList
public boolean removeAll(Collection c)
removeAll
in interface IObservableList
public boolean retainAll(Collection c)
retainAll
in interface IObservableList
public boolean equals(Object o)
equals
in interface IObservableList
public int hashCode()
hashCode
in interface IObservableList
public int indexOf(Object o)
indexOf
in interface IObservableList
public int lastIndexOf(Object o)
lastIndexOf
in interface IObservableList
public Realm getRealm()
IObservable
Because observables can only be accessed from within one realm, and they always fire events on that realm, their state can be observed in an incremental way. It is always safe to call getters of an observable from within a change listener attached to that observable.
getRealm
in interface IObservable
protected void checkRealm()
AssertionFailedException
- if the realm is not the current realmRealm.isCurrent()
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.