drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/Node.java
public Node addChild(Node n) {
        if (!this.children.containsKey(n.getToken())) {
            this.children.put(n.getToken(),n);
            n.setParent(this);
            return n;
        } else {
            return (Node)this.children.get(n.getToken());
        }
    }
public Node addChild(Node n) {
        if (!this.children.containsKey(n.getToken())) {
            this.children.put(n.getToken(),n);
            n.setParent(this);
            return n;
        } else {
            return (Node)this.children.get(n.getToken());
        }
    }
public Node addChild ( Node n ) { if ( ! this . children . containsKey ( n . getToken ( ) ) ) { this . children . put ( n . getToken ( ) , n ) ; n . setParent ( this ) ; return n ; } else { return ( Node ) this . children . get ( n . getToken ( ) ) ; } }
The method will check to see if a Node with the same string token
already exists. If it doesn't, it will add the token as a child and
return the same node.

On the otherhand, if there is an existing Node for the same string
token, the method returns the existing Node instance.
@param n
@return
The method will check to see if a Node with the same string token already exists . If it doesn t it will add the token as a child and return the same node .