|
|||||||||||
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.emf.common.util.BasicEList
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList
Nested Class Summary |
Nested classes inherited from class org.eclipse.emf.common.util.BasicEList |
BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator, BasicEList.EListIterator, BasicEList.FastCompare, BasicEList.NonResolvingEIterator, BasicEList.NonResolvingEListIterator, BasicEList.UnmodifiableEList |
Field Summary | |
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 | |
void |
add(int index,
Object object)
Adds the object at the given index in the list. |
boolean |
add(Object 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.
|
boolean |
addAll(Collection collection)
Adds each object of the collection to the end of the list. |
protected boolean |
canContainNull()
Returns whether null is a valid object for the list.
|
void |
clear()
Clears the list of all objects. |
Object[] |
data()
Returns direct unsafe access to the underlying data storage. |
protected void |
didAdd(int index,
Object newObject)
Called to indicate that an object has been added to the data storage. |
protected void |
didRemove(int index,
Object oldObject)
Called to indicate that an object has been removed from the data storage. |
protected void |
ensureSafety()
|
Object |
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. |
void |
move(int newPosition,
Object object)
Moves the object to the index of the list. |
protected Object[] |
newData(int capacity)
Returns new allocated data storage. |
Object |
remove(int index)
Removes the object at the index from the list and returns it. |
boolean |
remove(Object object)
Removes the object from the list and returns whether the object was actually contained by the list. |
boolean |
removeAll(Collection collection)
Removes each object of the collection from the list and returns whether any object was actually contained by the list. |
boolean |
retainAll(Collection collection)
Removes from the list each object not contained by the collection and returns whether any object was actually removed. |
Object |
set(int index,
Object 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 |
addAll, addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, basicIterator, basicList, basicListIterator, basicListIterator, clone, contains, containsAll, didChange, didClear, didMove, didSet, equalObjects, equals, get, getDuplicates, getNonDuplicates, grow, hashCode, indexOf, isEmpty, isUnique, iterator, lastIndexOf, listIterator, listIterator, resolve, setData, setUnique, shrink, size, toArray, toArray, toString, validate |
Methods inherited from class java.util.AbstractList |
removeRange, subList |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
subList |
Field Detail |
protected Notifier notifier
protected boolean safe
Constructor Detail |
public BasicNotifierImpl.EAdapterList(Notifier notifier)
Method Detail |
protected boolean canContainNull()
BasicEList
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 BasicEList
null
is a valid object for the list.protected boolean useEquals()
BasicEList
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 BasicEList
equals
rather than ==
should be used.protected Object[] newData(int capacity)
BasicEList
newData
in class BasicEList
protected void didAdd(int index, Object newObject)
BasicEList
didAdd
in class BasicEList
index
- the position object the new object.newObject
- the new object at the position.protected void didRemove(int index, Object oldObject)
BasicEList
didRemove
in class BasicEList
index
- the position of the old object.oldObject
- the old object at the position.public Object[] data()
BasicEList
data
in class BasicEList
protected void ensureSafety()
public boolean add(Object object)
BasicEList
uniqueness
is required,
duplicates will be ignored and false
will be returned.
This implementation delegates to addUnique(Object)
after uniqueness checking.
add
in interface List
add
in class BasicEList
object
- the object to be added.
BasicEList.addUnique(Object)
public void add(int index, Object object)
BasicEList
uniqueness
is required,
duplicates will be ignored.
This implementation delegates to addUnique(int, Object)
after uniqueness checking.
add
in interface List
add
in class BasicEList
object
- the object to be added.BasicEList.addUnique(int, Object)
public boolean addAll(Collection collection)
BasicEList
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 List
addAll
in class BasicEList
collection
- the collection of objects to be added.BasicEList.addAllUnique(Collection)
public boolean remove(Object object)
BasicEList
indexOf
to find the object
and delegates to remove(int)
in the case that it finds the object.
remove
in interface List
remove
in class BasicEList
object
- the object to be removed.
public Object remove(int index)
BasicEList
didRemove
and didChange
.
remove
in interface List
remove
in class BasicEList
index
- the position of the object to remove.
public boolean removeAll(Collection collection)
BasicEList
removeAll
in interface List
removeAll
in class BasicEList
collection
- the collection of objects to be removed.
public void clear()
BasicEList
didClear
and didChange
.
clear
in interface List
clear
in class BasicEList
public boolean retainAll(Collection collection)
BasicEList
remove(int)
in the case that it finds an object that isn't retained.
retainAll
in interface List
retainAll
in class BasicEList
collection
- the collection of objects to be retained.
public Object set(int index, Object object)
BasicEList
setUnique
after range checking and after uniqueness
checking.
set
in interface List
set
in class BasicEList
index
- the position in question.object
- the object to set.
BasicEList.setUnique(int, java.lang.Object)
public void move(int newPosition, Object object)
BasicEList
BasicEList.indexOf(java.lang.Object)
of find the object
and delegates to move(int, int)
.
move
in interface EList
move
in class BasicEList
newPosition
- the new position for the object in the list.object
- the object to be moved.public Object move(int newPosition, int oldPosition)
BasicEList
assign
, didMove
, and didChange
.
move
in interface EList
move
in class BasicEList
newPosition
- the new position for the object in the list.oldPosition
- the old position of the object in the list.
|
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 |