All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rabbitmq.jms.parse.ParseTree Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
/* Copyright (c) 2013-2020 VMware, Inc. or its affiliates. All rights reserved. */
/**
 * Parse trees capture a structured view of a parsed token stream.
 * They encapsulate the result of a parse() operation.
 * 

* *

*

* Traversal algorithms will assume that there are no loops in the tree (no child can be its own ancestor). *

*/ package com.rabbitmq.jms.parse; /** * A non-empty tree of {@link Node}s which can be traversed. *

* The tree is a {@link Node} and a(n array of) children (if there are no children this must be a zero-length array and must not be null). * Each child in the array is a {@link ParseTree ParseTree<Node>}. *

* @param - the type of nodes in the tree, a {@link Node} is attached to the root of each subtree. */ public interface ParseTree { /** * @return the node at the root of the tree. */ Node getNode(); /** * Convenience method to avoid creating children prematurely. Must be the same as getChildren().length. * @return the number of children of the root. */ int getNumberOfChildren(); /** * Get the immediate children of the root of the tree. * @return an array of children. */ ParseTree[] getChildren(); /** * Get the nodes of the immediate children of the root of the tree. * @return an array of {@link Node}s. */ Node[] getChildNodes(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy