Class InputStack

All Implemented Interfaces:
Serializable, Cloneable, Iterable<InputNode>, Collection<InputNode>, List<InputNode>, RandomAccess, SequencedCollection<InputNode>

class InputStack extends Stack<InputNode>
The InputStack is used to keep track of the nodes that have been read from the document. This ensures that when nodes are read from the source document that the reader can tell whether a child node for a given InputNode can be created. Each created node is pushed, and popped when ended.
See Also:
  • Constructor Details

    • InputStack

      public InputStack()
      Constructor for the InputStack object. This is used to create a stack that can be used to keep track of the elements that have been read from the source XML document.
  • Method Details

    • isRelevant

      public boolean isRelevant(InputNode value)
      This is used to determine if the specified node is relevant with respect to the state of the input stack. This returns true if there are no elements in the stack, which accounts for a new root node. Also this returns true if the specified node exists within the stack and is thus an active node.
      Parameters:
      value - this is the input node value to be checked
      Returns:
      returns true if the node is relevant in the stack