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 doingprettyPrint().- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description AbstractExplanation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 StringgetOriginalTraversalAsString()protected abstract Stream<String>getStrategyTraversalsAsString()protected Stream<String>getTraversalStepsAsString()StringprettyPrint()StringprettyPrint(int maxLineLength)A pretty-print representation of the traversal explanation.static voidspacing(String finalTraversal, int maxStrategyColumnLength, StringBuilder builder)StringtoString()
-
-
-
Method Detail
-
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.
-
prettyPrint
public String prettyPrint()
-
prettyPrint
public String prettyPrint(int maxLineLength)
A pretty-print representation of the traversal explanation.- Returns:
- a
Stringrepresentation of the traversal explanation
-
spacing
public static void spacing(String finalTraversal, int maxStrategyColumnLength, StringBuilder builder)
-
-