| org.zkoss.util.TreeArray org.zkoss.util.CheckableTreeArray
CheckableTreeArray | abstract public class CheckableTreeArray extends TreeArray (Code) | | The checkable TreeArray. It extends TreeArray such that deriving
classes could add validation when an element is added, removed or set.
It is also useful to maintain the modification flag.
author: tomyeh |
Inner Class :protected class CkEntry extends RbEntry | |
Method Summary | |
public void | clear() | protected void | delete(RbEntry p) | protected RbEntry | insert(RbEntry insertBefore, RbEntry p) | protected RbEntry | newEntry(Object element) | protected void | onAdd(Object newElement, Object followingElement) 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.
Parameters: newElement - the element to be added Parameters: followingElement - the elment that will 'follow' the new element.In other words, newElement will be inserted beforefollowingElement. | protected void | onRemove(Object element) Called each time an element is about being removed from the array. | protected void | onSet(Object newElement, Object replaced) Called each time an element is about being assigned into the array
and replace an existence one (by ListIterator.set). |
CheckableTreeArray | protected CheckableTreeArray()(Code) | | |
clear | public void clear()(Code) | | |
delete | protected void delete(RbEntry p)(Code) | | |
insert | protected RbEntry insert(RbEntry insertBefore, RbEntry p)(Code) | | |
onAdd | protected void onAdd(Object newElement, Object followingElement)(Code) | | 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.
Parameters: newElement - the element to be added Parameters: followingElement - the elment that will 'follow' the new element.In other words, newElement will be inserted beforefollowingElement. If null, it means newElement is appended at the end |
onRemove | protected void onRemove(Object element)(Code) | | Called each time an element is about being removed from the array.
Deriving classes usually put checking codes here.
And, throws exception if failure.
|
onSet | protected void onSet(Object newElement, Object replaced)(Code) | | 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.
Parameters: newElement - the element to be added Parameters: replaced - the element to be replaced |
Methods inherited from org.zkoss.util.TreeArray | public void add(int index, Object element)(Code)(Java Doc) final public void addAllByOrder(Collection cn)(Code)(Java Doc) final public void addAllByOrder(Collection cn, Comparator c)(Code)(Java Doc) final public void addByOrder(Object element)(Code)(Java Doc) final public void addByOrder(Object element, Comparator c)(Code)(Java Doc) final public Entry addEntry(Entry insertBefore, Object element)(Code)(Java Doc) final public Entry addEntry(int index, Object element)(Code)(Java Doc) final public Entry addEntry(Object element)(Code)(Java Doc) final protected RbEntry checkNotOrphan(Entry entry)(Code)(Java Doc) final protected void checkRange(int index)(Code)(Java Doc) final protected void checkRangePlus(int index)(Code)(Java Doc) public void clear()(Code)(Java Doc) public Object clone()(Code)(Java Doc) final protected void decSize()(Code)(Java Doc) protected RbEntry delete(int index)(Code)(Java Doc) protected void delete(RbEntry p)(Code)(Java Doc) final public ListIterator entryIterator(int index)(Code)(Java Doc) final public ListIterator entryIterator()(Code)(Java Doc) final protected RbEntry first()(Code)(Java Doc) final public Object get(int index)(Code)(Java Doc) final public Object getByOrder(Object element)(Code)(Java Doc) final public Object getByOrder(Object element, Comparator c)(Code)(Java Doc) final public Entry getEntry(int index)(Code)(Java Doc) final protected RbEntry getRbEntry(int index)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) final protected void incSize()(Code)(Java Doc) final protected int indexOfEntry(RbEntry p)(Code)(Java Doc) final public int indexOfEntry(Entry p)(Code)(Java Doc) final protected void indexOutOfBounds(int index)(Code)(Java Doc) final protected RbEntry insert(int index, RbEntry p)(Code)(Java Doc) protected RbEntry insert(RbEntry insertBefore, RbEntry p)(Code)(Java Doc) final public Iterator iterator()(Code)(Java Doc) final public ListIterator listIterator(int index)(Code)(Java Doc) protected RbEntry newEntry(Object element)(Code)(Java Doc) public Object remove(int index)(Code)(Java Doc) final public boolean removeByOrder(Object element)(Code)(Java Doc) final public boolean removeByOrder(Object element, Comparator c)(Code)(Java Doc) final public void removeEntry(Entry p)(Code)(Java Doc) final public Entry removeEntry(int index)(Code)(Java Doc) final public int search(Object element)(Code)(Java Doc) final public int search(Object element, Comparator c)(Code)(Java Doc) public Object set(int index, Object element)(Code)(Java Doc) final public int size()(Code)(Java Doc) final public void sort()(Code)(Java Doc) final public void sort(Comparator c)(Code)(Java Doc)
|
|
|