org.apache.tinkerpop.gremlin.process.traversal.util

## Class AbstractExplanation

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.util.AbstractExplanation

- Direct Known Subclasses:
    TraversalExplanation

      public abstract class AbstractExplanation
      extends Object

  Base class for "TraversalExplanation" instances and centralizes the key functionality which is the job of doing `prettyPrint()`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractExplanation()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract Stream<org.javatuples.Triplet<String,String,String>>` | `getIntermediates()` First string is the traversal strategy, the second is the category and the third is the traversal representation at that point.
    `protected abstract String` | `getOriginalTraversalAsString()`
    `protected abstract Stream<String>` | `getStrategyTraversalsAsString()`
    `protected Stream<String>` | `getTraversalStepsAsString()`
    `String` | `prettyPrint()`
    `String` | `prettyPrint(int maxLineLength)` A pretty-print representation of the traversal explanation.
    `static void` | `spacing(String finalTraversal, int maxStrategyColumnLength, StringBuilder builder)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractExplanation

          public AbstractExplanation()

  - ### Method Detail

    - #### getStrategyTraversalsAsString

          protected abstract Stream<String> getStrategyTraversalsAsString()

    - #### getTraversalStepsAsString

          protected Stream<String> getTraversalStepsAsString()

    - #### getOriginalTraversalAsString

          protected abstract String getOriginalTraversalAsString()

    - #### getIntermediates

          protected abstract Stream<org.javatuples.Triplet<String,String,String>> getIntermediates()

      First string is the traversal strategy, the second is the category and the third is the traversal representation at that point.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### prettyPrint

          public String prettyPrint()

    - #### prettyPrint

          public String prettyPrint(int maxLineLength)

      A pretty-print representation of the traversal explanation.
      Returns:
        a `String` representation of the traversal explanation

    - #### spacing

          public static void spacing(String finalTraversal,
                                     int maxStrategyColumnLength,
                                     StringBuilder builder)

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.