|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.emf.common.util.AbstractEList<E>
org.eclipse.emf.common.util.BasicEList<E>
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E>
public static class BasicNotifierImpl.EAdapterList<E extends java.lang.Object & Adapter>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.util.BasicEList |
---|
BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.FastCompare<E>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E> |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList |
---|
BasicNotifierImpl.EObservableAdapterList.Listener |
Field Summary | |
---|---|
protected BasicNotifierImpl.EObservableAdapterList.Listener[] |
listeners
|
protected Notifier |
notifier
|
protected boolean |
safe
|
Fields inherited from class org.eclipse.emf.common.util.BasicEList |
---|
data, size |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
BasicNotifierImpl.EAdapterList(Notifier notifier)
|
Method Summary | |
---|---|
boolean |
add(E object)
Adds the object at the end of the list and returns whether the object was added; if uniqueness is required,
duplicates will be ignored and false will be returned. |
void |
add(int index,
E object)
Adds the object at the given index in the list. |
boolean |
addAll(java.util.Collection<? extends E> collection)
Adds each object of the collection to the end of the list. |
void |
addListener(BasicNotifierImpl.EObservableAdapterList.Listener listener)
Adds another listener from the adapter list. |
protected boolean |
canContainNull()
Returns whether null is a valid object for the list. |
void |
clear()
Clears the list of all objects. |
java.lang.Object[] |
data()
Returns direct unsafe access to the underlying data storage. |
protected void |
didAdd(int index,
E newObject)
Called to indicate that an object has been added to the data storage. |
protected void |
didRemove(int index,
E oldObject)
Called to indicate that an object has been removed from the data storage. |
protected void |
ensureSafety()
|
void |
move(int newPosition,
E object)
Moves the object to the index of the list. |
E |
move(int newPosition,
int oldPosition)
Moves the object at the source index of the list to the target index of the list and returns the moved object. |
protected java.lang.Object[] |
newData(int capacity)
Returns new allocated data storage. |
E |
remove(int index)
Removes the object at the index from the list and returns it. |
boolean |
remove(java.lang.Object object)
Removes the object from the list and returns whether the object was actually contained by the list. |
boolean |
removeAll(java.util.Collection<?> collection)
Removes each object of the collection from the list and returns whether any object was actually contained by the list. |
void |
removeListener(BasicNotifierImpl.EObservableAdapterList.Listener listener)
Remove the listener from the adapter list. |
boolean |
retainAll(java.util.Collection<?> collection)
Removes from the list each object not contained by the collection and returns whether any object was actually removed. |
E |
set(int index,
E object)
Sets the object at the index and returns the old object at the index. |
protected boolean |
useEquals()
Returns whether equals rather than == should be used to compare members. |
Methods inherited from class org.eclipse.emf.common.util.BasicEList |
---|
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, basicList, clone, contains, get, grow, indexOf, isEmpty, lastIndexOf, primitiveGet, setData, setUnique, shrink, size, toArray, toArray |
Methods inherited from class org.eclipse.emf.common.util.AbstractEList |
---|
addAll, basicIterator, basicListIterator, basicListIterator, didChange, didClear, didMove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, isUnique, iterator, listIterator, listIterator, resolve, toString, validate |
Methods inherited from class java.util.AbstractList |
---|
removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, subList |
Field Detail |
---|
protected Notifier notifier
protected BasicNotifierImpl.EObservableAdapterList.Listener[] listeners
protected boolean safe
Constructor Detail |
---|
public BasicNotifierImpl.EAdapterList(Notifier notifier)
Method Detail |
---|
protected boolean canContainNull()
AbstractEList
null
is a valid object for the list.
The default is to return true
, but clients can override this to exclude null
.
canContainNull
in class AbstractEList<E extends java.lang.Object & Adapter>
null
is a valid object for the list.protected boolean useEquals()
AbstractEList
equals
rather than ==
should be used to compare members.
The default is to return true
but clients can optimize performance by returning false
.
The performance difference is highly significant.
useEquals
in class AbstractEList<E extends java.lang.Object & Adapter>
equals
rather than ==
should be used.protected java.lang.Object[] newData(int capacity)
BasicEList
newData
in class BasicEList<E extends java.lang.Object & Adapter>
protected void didAdd(int index, E newObject)
AbstractEList
didAdd
in class AbstractEList<E extends java.lang.Object & Adapter>
index
- the position object the new object.newObject
- the new object at the position.protected void didRemove(int index, E oldObject)
AbstractEList
didRemove
in class AbstractEList<E extends java.lang.Object & Adapter>
index
- the position of the old object.oldObject
- the old object at the position.public java.lang.Object[] data()
BasicEList
data
in class BasicEList<E extends java.lang.Object & Adapter>
protected void ensureSafety()
public boolean add(E object)
AbstractEList
uniqueness
is required,
duplicates will be ignored and false
will be returned.
This implementation delegates to addUnique(E)
after uniqueness checking.
add
in interface java.util.Collection<E extends java.lang.Object & Adapter>
add
in interface java.util.List<E extends java.lang.Object & Adapter>
add
in class AbstractEList<E extends java.lang.Object & Adapter>
object
- the object to be added.
AbstractEList.addUnique(Object)
public void add(int index, E object)
AbstractEList
uniqueness
is required,
duplicates will be ignored.
This implementation delegates to addUnique(int, E)
after uniqueness checking.
add
in interface java.util.List<E extends java.lang.Object & Adapter>
add
in class AbstractEList<E extends java.lang.Object & Adapter>
object
- the object to be added.AbstractEList.addUnique(int, Object)
public boolean addAll(java.util.Collection<? extends E> collection)
AbstractEList
uniqueness
is required,
duplicates will be removed
from the collection,
which could even result in an empty collection.
This implementation delegates to addAllUnique(Collection)
after uniqueness checking.
addAll
in interface java.util.Collection<E extends java.lang.Object & Adapter>
addAll
in interface java.util.List<E extends java.lang.Object & Adapter>
addAll
in class AbstractEList<E extends java.lang.Object & Adapter>
collection
- the collection of objects to be added.AbstractEList.addAllUnique(Collection)
public boolean remove(java.lang.Object object)
AbstractEList
indexOf
to find the object
and delegates to remove(int)
in the case that it finds the object.
remove
in interface java.util.Collection<E extends java.lang.Object & Adapter>
remove
in interface java.util.List<E extends java.lang.Object & Adapter>
remove
in class AbstractEList<E extends java.lang.Object & Adapter>
object
- the object to be removed.
public E remove(int index)
BasicEList
didRemove
and didChange
.
remove
in interface java.util.List<E extends java.lang.Object & Adapter>
remove
in class BasicEList<E extends java.lang.Object & Adapter>
index
- the position of the object to remove.
public boolean removeAll(java.util.Collection<?> collection)
AbstractEList
removeAll
in interface java.util.Collection<E extends java.lang.Object & Adapter>
removeAll
in interface java.util.List<E extends java.lang.Object & Adapter>
removeAll
in class AbstractEList<E extends java.lang.Object & Adapter>
collection
- the collection of objects to be removed.
public void clear()
BasicEList
didClear
and didChange
.
clear
in interface java.util.Collection<E extends java.lang.Object & Adapter>
clear
in interface java.util.List<E extends java.lang.Object & Adapter>
clear
in class BasicEList<E extends java.lang.Object & Adapter>
public boolean retainAll(java.util.Collection<?> collection)
AbstractEList
remove(int)
in the case that it finds an object that isn't retained.
retainAll
in interface java.util.Collection<E extends java.lang.Object & Adapter>
retainAll
in interface java.util.List<E extends java.lang.Object & Adapter>
retainAll
in class AbstractEList<E extends java.lang.Object & Adapter>
collection
- the collection of objects to be retained.
public E set(int index, E object)
AbstractEList
setUnique
after range checking and after uniqueness
checking.
set
in interface java.util.List<E extends java.lang.Object & Adapter>
set
in class AbstractEList<E extends java.lang.Object & Adapter>
index
- the position in question.object
- the object to set.
AbstractEList.setUnique(int, E)
public void move(int newPosition, E object)
AbstractEList
AbstractList.indexOf(java.lang.Object)
of find the object
and delegates to move(int, int)
.
move
in interface EList<E extends java.lang.Object & Adapter>
move
in class AbstractEList<E extends java.lang.Object & Adapter>
newPosition
- the new position for the object in the list.object
- the object to be moved.public E move(int newPosition, int oldPosition)
BasicEList
assign
, didMove
, and didChange
.
move
in interface EList<E extends java.lang.Object & Adapter>
move
in class BasicEList<E extends java.lang.Object & Adapter>
newPosition
- the new position for the object in the list.oldPosition
- the old position of the object in the list.
public void addListener(BasicNotifierImpl.EObservableAdapterList.Listener listener)
BasicNotifierImpl.EObservableAdapterList
addListener
in interface BasicNotifierImpl.EObservableAdapterList
listener
- the listener being added.public void removeListener(BasicNotifierImpl.EObservableAdapterList.Listener listener)
BasicNotifierImpl.EObservableAdapterList
removeListener
in interface BasicNotifierImpl.EObservableAdapterList
listener
- the listener being removed.
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |