Documentation of 'cc.redberry.core.tensor.iterator.StackPosition' Java class
StackPosition
cc.redberry.core.tensor.iterator

Interface StackPosition<T extends Payload<T>>



  • public interface StackPosition<T extends Payload<T>>
    Since:
    1.1
    • Method Detail

      • getInitialTensor

        Tensor getInitialTensor()
        Returns tensor, with which this position was initialized or throws the IllegalStateException if initial tensor is no longer available (was rebuilt).
        Returns:
        tensor, with which this position was initialized
        Throws:
        java.lang.IllegalStateException - if initial tensor is no longer available (was rebuilt)
      • getTensor

        Tensor getTensor()
        If tensor was modified somewhere during iteration (by the invocation of TreeTraverseIterator.set(cc.redberry.core.tensor.Tensor)) this method returns the resulting tensors. Otherwise it returns tensor, with which this position was initialized. If tensor was modified, but iteration was not finished yet it throws the IllegalStateException exception.
        Returns:
        the resulting tensor, or the initial tensor if it was not modified.
        Throws:
        java.lang.IllegalStateException - if tensor was modified, but iteration was not finished.
      • isModified

        boolean isModified()
        Returns true if initial tensor was modified during iteration.
        Returns:
        true if initial tensor was modified during iteration
      • previous

        StackPosition<T> previous()
        Returns the position tree node.
        Returns:
        the position tree node
      • previous

        StackPosition<T> previous(int level)
        Returns the i-th level position of tree node.
        Returns:
        the i-th level position of tree node
      • getPayload

        T getPayload()
        Returns the payload of current stack position.
        Returns:
        the payload of current stack position
      • isPayloadInitialized

        boolean isPayloadInitialized()
        Returns true if lazy payload creation was triggered
        Returns:
        true if lazy payload creation was triggered
      • getDepth

        int getDepth()
        Returns depth in the tree, relatively to the current cursor position.
        Returns:
        depth in the tree relatively to the current cursor position
      • currentIndex

        int currentIndex()
        Returns current index in initial tensor and Integer.MAX_VALUE if initial tensor was rebuilt.
        Returns:
        current index in initial tensor and Integer.MAX_VALUE if initial tensor was rebuilt

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.