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 Details

    • AbstractExplanation

      public AbstractExplanation()
  • Method Details

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