Package org.zkoss.idom
Class Document.ChildArray
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- org.zkoss.util.NotableLinkedList<Item>
-
- org.zkoss.idom.Document.ChildArray
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<Item>
,java.util.Collection<Item>
,java.util.List<Item>
- Enclosing class:
- Document
protected class Document.ChildArray extends NotableLinkedList<Item>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChildArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onAdd(Item newElement, Item followingElement)
Called each time an new element is about being added into the array.protected void
onRemove(Item item)
Called each time an element is about being removed from the array.protected void
onSet(Item newElement, Item replaced)
Called each time an element is about being assigned into the array and replace an existence one (by ListIterator.set).-
Methods inherited from class org.zkoss.util.NotableLinkedList
listIterator, 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
-
-
-
-
Method Detail
-
onAdd
protected void onAdd(Item newElement, Item followingElement)
Description copied from class:NotableLinkedList
Called each time an new element is about being added into the array.Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.
- Overrides:
onAdd
in classNotableLinkedList<Item>
- Parameters:
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
-
onSet
protected void onSet(Item newElement, Item replaced)
Description copied from class:NotableLinkedList
Called each time an element is about being assigned into the array and replace an existence one (by ListIterator.set).Deriving classes usually put checking codes here. And, throws exception if failure and nothing will be affected.
- Overrides:
onSet
in classNotableLinkedList<Item>
- Parameters:
newElement
- the element to be addedreplaced
- the element to be replaced
-
onRemove
protected void onRemove(Item item)
Description copied from class:NotableLinkedList
Called each time an element is about being removed from the array. Deriving classes usually put checking codes here. And, throws exception if failure.- Overrides:
onRemove
in classNotableLinkedList<Item>
-
-