|
||||||||||
| 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>
java.util.AbstractSequentialList<E>
org.zkoss.util.NotableLinkedList<E>
public class NotableLinkedList<E>
Linked list implementation of the List interface
that provides the callback methods such as onAdd(E, E), onSet(E, E)
and onRemove(E).
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
NotableLinkedList()
|
|
| Method Summary | |
|---|---|
java.util.ListIterator<E> |
listIterator(int index)
|
protected void |
onAdd(E newElement,
E followingElement)
Called each time an new element is about being added into the array. |
protected void |
onRemove(E element)
Called each time an element is about being removed from the array. |
protected void |
onSet(E newElement,
E replaced)
Called each time an element is about being assigned into the array and replace an existence one (by ListIterator.set). |
int |
size()
|
| Methods inherited from class java.util.AbstractSequentialList |
|---|
add, addAll, get, iterator, remove, set |
| Methods inherited from class java.util.AbstractList |
|---|
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
| Constructor Detail |
|---|
public NotableLinkedList()
| Method Detail |
|---|
public int size()
size in interface java.util.Collection<E>size in interface java.util.List<E>size in class java.util.AbstractCollection<E>public java.util.ListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>listIterator in class java.util.AbstractSequentialList<E>
protected void onAdd(E newElement,
E followingElement)
Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.
newElement - the element to be addedfollowingElement - the element that will 'follow' the new element.
In other words, newElement will be inserted before
followingElement. If null, it means newElement is appended at the end
protected void onSet(E newElement,
E replaced)
Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.
newElement - the element to be addedreplaced - the element to be replacedprotected void onRemove(E element)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||