org.zeroexchange.web.components.form.tree
Class DynamicTreeNode<T>

java.lang.Object
  extended by org.zeroexchange.web.components.form.tree.DynamicTreeNode<T>
All Implemented Interfaces:
Serializable, TreeNode

public class DynamicTreeNode<T>
extends Object
implements TreeNode, Serializable

Author:
black
See Also:
Serialized Form

Field Summary
protected  List<DynamicTreeNode<T>> cachedChildNodes
           
 
Constructor Summary
DynamicTreeNode(T item, DynamicTreeNode<T> parentNode, TreeDateProvider<T> dataProvider)
          Constructor.
 
Method Summary
 Enumeration<DynamicTreeNode<T>> children()
           
 boolean equals(Object obj)
          
 boolean getAllowsChildren()
           
protected  List<DynamicTreeNode<T>> getCachedChildNodes()
          Returns cached items.
 TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 int getIndex(TreeNode node)
           
 T getItem()
           
protected  Iterable<T> getIterable()
           
 TreeNode getNodeByItem(T item)
          Returns node by its item.
 TreeNode getParent()
           
 int hashCode()
          
 boolean isLeaf()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cachedChildNodes

protected List<DynamicTreeNode<T>> cachedChildNodes
Constructor Detail

DynamicTreeNode

public DynamicTreeNode(T item,
                       DynamicTreeNode<T> parentNode,
                       TreeDateProvider<T> dataProvider)
Constructor.

Method Detail

getItem

public T getItem()
Returns:
the item

getCachedChildNodes

protected List<DynamicTreeNode<T>> getCachedChildNodes()
Returns cached items.


getIterable

protected Iterable<T> getIterable()

getChildAt

public TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface TreeNode

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

getIndex

public int getIndex(TreeNode node)
Specified by:
getIndex in interface TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface TreeNode

children

public Enumeration<DynamicTreeNode<T>> children()
Specified by:
children in interface TreeNode

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

getNodeByItem

public TreeNode getNodeByItem(T item)
Returns node by its item.



Copyright © 2013. All Rights Reserved.