public class WikittyQueryResultTreeNode<T extends Serializable> extends DefaultMutableTreeNode implements Iterable<WikittyQueryResultTreeNode<T>>
| Modifier and Type | Class and Description |
|---|---|
static interface |
WikittyQueryResultTreeNode.Visitor<T extends Serializable>
Visitor for TreeNodeResult
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
attCount |
protected T |
object
optional user object
|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject| Constructor and Description |
|---|
WikittyQueryResultTreeNode(T userObject)
Creates a tree node with no parent, no children, but which allows
children, and initializes it with the specified user object.
|
WikittyQueryResultTreeNode(T userObject,
boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with
the specified user object, and that allows children only if
specified.
|
WikittyQueryResultTreeNode(T object,
int attCount) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptVisitor(WikittyQueryResultTreeNode.Visitor<T> visitor)
Visite en profondeur de l'arbre, il est possible d'arreter la visite
soit en entrant dans le noeud soit en sortant du noeud, si respectivement
visitEnter ou visitLeave retourne false.
|
int |
getAttCount()
Retourn le nombre d'attachment pour ce noeud (avec les sous noeud)
|
WikittyQueryResultTreeNode<T> |
getChild(T child)
Return TreeNodeResult where object in TreeNodeResult equals child in
parameter
|
List<WikittyQueryResultTreeNode<T>> |
getChildren()
Get direct children of this node
|
T |
getObject()
Retourne l'objet associe avec ce noeud (id, wikitty ou BusinessEntity)
|
T |
getUserObject()
Returns this node's user object.
|
Iterator<WikittyQueryResultTreeNode<T>> |
iterator()
Iterate on all children or sub-children, in depth first
|
void |
setUserObject(T userObject)
Sets the user object for this node to
userObject. |
String |
toString()
Returns the result of sending
toString() to this node's
user object, or null if this node has no user object. |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObjectprotected T extends Serializable object
protected int attCount
public WikittyQueryResultTreeNode(T object, int attCount)
object - L'id, le wikitty ou le BusinessEntity suivant le type de TattCount - le nombre d'attachment pour ce noeud (avec les sous noeud)public WikittyQueryResultTreeNode(T userObject)
userObject - an Object provided by the user that constitutes
the node's datapublic WikittyQueryResultTreeNode(T userObject, boolean allowsChildren)
userObject - an Object provided by the user that constitutes
the node's dataallowsChildren - if true, the node is allowed to have child
nodes -- otherwise, it is always a leaf nodepublic void setUserObject(T userObject)
userObject.userObject - the Object that constitutes this node's
user-specified datagetUserObject(),
toString()public T getUserObject()
getUserObject in class DefaultMutableTreeNodetoString()public String toString()
toString() to this node's
user object, or null if this node has no user object.toString in class DefaultMutableTreeNodegetUserObject()public boolean acceptVisitor(WikittyQueryResultTreeNode.Visitor<T> visitor)
visitor - public List<WikittyQueryResultTreeNode<T>> getChildren()
public Iterator<WikittyQueryResultTreeNode<T>> iterator()
iterator in interface Iterable<WikittyQueryResultTreeNode<T extends Serializable>>public T getObject()
public WikittyQueryResultTreeNode<T> getChild(T child)
child - public int getAttCount()
Copyright © 2009–2013 CodeLutin. All rights reserved.