Examples of TreeNode


Examples of leetcode.TreeNode

public class FlattenBinaryTreeToLinkedList {
    public void flatten(TreeNode root) {
        if (root == null)
            return;
        Stack<TreeNode> stack = new Stack<TreeNode>();
        TreeNode pre = null;
        stack.push(root);

        while (stack.size() > 0) {
            root = stack.pop();
            if (root.right != null)
View Full Code Here

Examples of logformat.slog2.input.TreeNode

                           String[]            yaxis_colnames,
                           Method[]            dobj_methods )
    {
        super( time_model );

        TreeNode   treeroot;
        short      depth_max, depth_init;

        t_model         = time_model;
        treetrunk       = treebody;
        y_maps          = yaxis_maps;
        tree_view       = y_maps.getTreeView();
        y_model         = yaxis_model;
        y_colnames      = yaxis_colnames;
        methods         = dobj_methods;
        treeroot        = treetrunk.getTreeRoot();
        depth_max       = treeroot.getTreeNodeID().depth;
        nesting_stacks  = new NestingStacks( tree_view );
        map_line2row    = null;
        drawn_boxes     = new DrawnBoxSet( tree_view );
        // timeframe4imgs to be initialized later in initializeAllOffImages()
        timeframe4imgs  = null;
View Full Code Here

Examples of org.activiti.designer.eclipse.navigator.TreeNode

    }
  }

  private void addProcessChild(final Process process) {
    if (process != null) {
      final TreeNode transparentTreeNode = DiagramTreeNodeFactory.createTransparentProcessNode(this, process);
      referenceChildNodesToOwnChildren(transparentTreeNode);
    }
  }
View Full Code Here

Examples of org.apache.accumulo.examples.wikisearch.parser.TreeNode

      // need to build the query tree based on jexl parsing.
      // Step 2: refactor QueryTree - inplace modification
      if (log.isDebugEnabled()) {
        log.debug("transformTreeNode");
      }
      TreeNode tree = qp.getIteratorTree();
      this.root = transformTreeNode(tree);
     
      if (log.isDebugEnabled()) {
        log.debug("refactorTree");
      }
View Full Code Here

Examples of org.apache.click.extras.tree.TreeNode

        String expandId = getContext().getRequestParameter(Tree.EXPAND_TREE_NODE_PARAM);
        if(selectId == null && expandId == null) {
            return;
        }

        TreeNode node = null;
        if(selectId != null) {
            node = tree.find(selectId);
        } else {
            node = tree.find(expandId);
        }
View Full Code Here

Examples of org.apache.directory.studio.schemaeditor.view.wrappers.TreeNode

     * @param o
     *      the object
     */
    private void linkViewWithEditor( Object o )
    {
        TreeNode wrapper = ( ( SchemaViewContentProvider ) view.getViewer().getContentProvider() ).getWrapper( o );
        if ( wrapper != null )
        {
            view.getViewer().setSelection( new StructuredSelection( wrapper ) );
        }
    }
View Full Code Here

Examples of org.apache.jasper.parser.TreeNode

        // Parse the web application deployment descriptor
        ClassLoader cl =
            // (ClassLoader) ctxt.getAttribute(Constants.SERVLET_CLASS_LOADER);
            this.getClass().getClassLoader();
        ParserUtils pu = ParserUtils.createParserUtils(cl);
        TreeNode webtld = pu.parseXMLDocument(WEB_XML, is);
        Iterator taglibs = webtld.findChildren("taglib");
        while (taglibs.hasNext()) {

            // Parse the next <taglib> element
            TreeNode taglib = (TreeNode) taglibs.next();
            String tagUri = null;
            String tagLoc = null;
            TreeNode child = taglib.findChild("taglib-uri");
            if (child != null)
                tagUri = child.getBody();
            child = taglib.findChild("taglib-location");
            if (child != null)
                tagLoc = child.getBody();

            // Save this location if appropriate
            if (tagLoc == null)
                continue;
            if (uriType(tagLoc) == NOROOT_REL_URI)
View Full Code Here

Examples of org.apache.jasper.xmlparser.TreeNode

            if (webXml.getInputSource() == null) {
                return;
            }

            // Parse the web application deployment descriptor
            TreeNode webtld = null;
            webtld = new ParserUtils().parseXMLDocument(webXml.getSystemId(),
                    webXml.getInputSource());

            // Allow taglib to be an element of the root or jsp-config (JSP2.0)
            TreeNode jspConfig = webtld.findChild("jsp-config");
            if (jspConfig != null) {
                webtld = jspConfig;
            }
            Iterator<TreeNode> taglibs = webtld.findChildren("taglib");
            while (taglibs.hasNext()) {

                // Parse the next <taglib> element
                TreeNode taglib = taglibs.next();
                String tagUri = null;
                String tagLoc = null;
                TreeNode child = taglib.findChild("taglib-uri");
                if (child != null)
                    tagUri = child.getBody();
                child = taglib.findChild("taglib-location");
                if (child != null)
                    tagLoc = child.getBody();

                // Save this location if appropriate
                if (tagLoc == null)
                    continue;
                if (uriType(tagLoc) == NOROOT_REL_URI)
View Full Code Here

Examples of org.apache.maven.index.treeview.TreeNode

    public void testRoot()
        throws Exception
    {
        TreeViewRequest req =
            new TreeViewRequest( new DefaultTreeNodeFactory( context.getRepositoryId() ), "/", context );
        TreeNode root = indexTreeView.listNodes( req );

        int leafsFound = prettyPrint( debug, root, 0 );

        assertEquals( "The group name should be here", "/", root.getNodeName() );
        assertEquals( 12, root.getChildren().size() );
        assertEquals( 49, leafsFound );
    }
View Full Code Here

Examples of org.apache.myfaces.custom.tree.TreeNode

            return;
        }

        if (node != null)
        {
            TreeNode parent = node.getParent();

            if (parent != null)
            {
                int index = parent.getIndex(node);
                if (index != -1)
                {
                    int[] childIndices = new int[1];

                    childIndices[0] = index;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.