Class WalkedPath

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

public class WalkedPath extends ArrayList<PathStep>
DataStructure used by a SpecTransform during it's parallel tree walk. Basically this is Stack that records the steps down the tree that have been taken. For each level, there is a PathStep, which contains a pointer the data of that level, and a pointer to the LiteralPathElement matched at that level. At any given point in time, it represents where in the tree walk a Spec is operating. It is primarily used to by the ShiftrLeafSpec and CardinalityLeafSpec as a reference to lookup real values for output "invalid input: '&'(1,1)" references. It is expected that as the SpecTransform navigates down the tree, MatchedElements will be added and then removed when that subtree has been walked.
See Also:
  • Constructor Details

  • Method Details

    • add

      public boolean add(Object treeRef, MatchedElement matchedElement)
      Convenience method
    • removeLast

      public void removeLast()
    • elementFromEnd

      public PathStep elementFromEnd(int idxFromEnd)
      Method useful to "invalid input: '&'", "invalid input: '&'1", "invalid input: '&'2", etc evaluation.
    • lastElement

      public PathStep lastElement()