Class InputStack

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<InputNode>, java.util.Collection<InputNode>, java.util.List<InputNode>, java.util.RandomAccess

    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:
    InputNode
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      InputStack()
      Constructor for the InputStack object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isRelevant​(InputNode value)
      This is used to determine if the specified node is relevant with respect to the state of the input stack.
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • 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 Detail

      • 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