org.nuiton.wikitty.search
Class TreeNodeResult<T extends Serializable>

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.nuiton.wikitty.search.TreeNodeResult<T>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<TreeNodeResult<T>>, MutableTreeNode, TreeNode

Deprecated. since 3.3 use new query api WikittyQuery

@Deprecated
public class TreeNodeResult<T extends Serializable>
extends DefaultMutableTreeNode
implements Iterable<TreeNodeResult<T>>

L'iteration se fait en profondeur

Since:
3.1 Last update: $Date: 2011-12-28 19:50:45 +0100 (mer, 28 déc 2011) $ by : $Author: bpoussin $
Version:
$Revision: 1259 $
Author:
poussin
See Also:
Serialized Form

Nested Class Summary
static interface TreeNodeResult.Visitor<T extends Serializable>
          Deprecated. Visitor for TreeNodeResult
 
Field Summary
protected  int attCount
          Deprecated.  
protected  T object
          Deprecated. optional user object
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
TreeNodeResult(T userObject)
          Deprecated. Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
TreeNodeResult(T userObject, boolean allowsChildren)
          Deprecated. Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
TreeNodeResult(T object, int attCount)
          Deprecated.  
 
Method Summary
 boolean acceptVisitor(TreeNodeResult.Visitor<T> visitor)
          Deprecated. 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()
          Deprecated. Retourn le nombre d'attachment pour ce noeud (avec les sous noeud)
 TreeNodeResult<T> getChild(T child)
          Deprecated. Return TreeNodeResult where object in TreeNodeResult equals child in parameter
 List<TreeNodeResult<T>> getChildren()
          Deprecated. Get direct children of this node
 T getObject()
          Deprecated. Retourne l'objet associe avec ce noeud (id, wikitty ou BusinessEntity)
 T getUserObject()
          Deprecated. Returns this node's user object.
 Iterator<TreeNodeResult<T>> iterator()
          Deprecated. Iterate on all children or sub-children, in depth first
 void setUserObject(T userObject)
          Deprecated. Sets the user object for this node to userObject.
 String toString()
          Deprecated. Returns the result of sending toString() to this node's user object, or null if this node has no user object.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
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, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

protected T extends Serializable object
Deprecated. 
optional user object


attCount

protected int attCount
Deprecated. 
Constructor Detail

TreeNodeResult

public TreeNodeResult(T object,
                      int attCount)
Deprecated. 
Parameters:
object - L'id, le wikitty ou le BusinessEntity suivant le type de T
attCount - le nombre d'attachment pour ce noeud (avec les sous noeud)

TreeNodeResult

public TreeNodeResult(T userObject)
Deprecated. 
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.

Parameters:
userObject - an Object provided by the user that constitutes the node's data

TreeNodeResult

public TreeNodeResult(T userObject,
                      boolean allowsChildren)
Deprecated. 
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.

Parameters:
userObject - an Object provided by the user that constitutes the node's data
allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node
Method Detail

setUserObject

public void setUserObject(T userObject)
Deprecated. 
Sets the user object for this node to userObject.

Parameters:
userObject - the Object that constitutes this node's user-specified data
See Also:
getUserObject(), toString()

getUserObject

public T getUserObject()
Deprecated. 
Returns this node's user object.

Overrides:
getUserObject in class DefaultMutableTreeNode
Returns:
the Object stored at this node by the user
See Also:
toString()

toString

public String toString()
Deprecated. 
Returns the result of sending toString() to this node's user object, or null if this node has no user object.

Overrides:
toString in class DefaultMutableTreeNode
See Also:
getUserObject()

acceptVisitor

public boolean acceptVisitor(TreeNodeResult.Visitor<T> visitor)
Deprecated. 
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.

Parameters:
visitor -

getChildren

public List<TreeNodeResult<T>> getChildren()
Deprecated. 
Get direct children of this node

Returns:

iterator

public Iterator<TreeNodeResult<T>> iterator()
Deprecated. 
Iterate on all children or sub-children, in depth first

Specified by:
iterator in interface Iterable<TreeNodeResult<T extends Serializable>>
Returns:

getObject

public T getObject()
Deprecated. 
Retourne l'objet associe avec ce noeud (id, wikitty ou BusinessEntity)

Returns:
l'objet associe avec ce noeud (id, wikitty ou BusinessEntity)

getChild

public TreeNodeResult<T> getChild(T child)
Deprecated. 
Return TreeNodeResult where object in TreeNodeResult equals child in parameter

Parameters:
child -
Returns:

getAttCount

public int getAttCount()
Deprecated. 
Retourn le nombre d'attachment pour ce noeud (avec les sous noeud)

Returns:


Copyright © 2009-2012 CodeLutin. All Rights Reserved.