Class WalkedPath

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

    public class WalkedPath
    extends java.util.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 "&(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:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.lang.Object treeRef, MatchedElement matchedElement)
      Convenience method
      PathStep elementFromEnd​(int idxFromEnd)
      Method useful to "&", "&1", "&2", etc evaluation.
      PathStep lastElement()  
      void removeLast()  
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, 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.AbstractList

        equals, hashCode
      • 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
      • Methods inherited from interface java.util.List

        containsAll, equals, hashCode
    • Constructor Detail

      • WalkedPath

        public WalkedPath()
      • WalkedPath

        public WalkedPath​(java.util.Collection<PathStep> c)
      • WalkedPath

        public WalkedPath​(java.lang.Object treeRef,
                          MatchedElement matchedElement)
    • Method Detail

      • add

        public boolean add​(java.lang.Object treeRef,
                           MatchedElement matchedElement)
        Convenience method
      • removeLast

        public void removeLast()
      • elementFromEnd

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

        public PathStep lastElement()