public String prettyPrint(final int maxLineLength) {
        final String originalTraversal = "Original Traversal";
        final String finalTraversal = "Final Traversal";
        final int maxStrategyColumnLength = getStrategyTraversalsAsString()
                .map(String::length)
                .max(Comparator.naturalOrder())
                .orElse(15);
        final int newLineIndent = maxStrategyColumnLength + 10;
        final int maxTraversalColumn = maxLineLength - newLineIndent;
        if (maxTraversalColumn < 1)
            throw new IllegalArgumentException("The maximum line length is too small to present the " + TraversalExplanation.class.getSimpleName() + ": " + maxLineLength);
        int largestTraversalColumn = getTraversalStepsAsString()
                .map(s -> wordWrap(s, maxTraversalColumn, newLineIndent))
                .flatMap(s -> Stream.of(s.split("\n")))
                .map(String::trim)
                .map(s -> s.trim().startsWith("[") ? s : "   " + s) // 3 indent on new lines
                .map(String::length)
                .max(Comparator.naturalOrder())
                .get();

        final StringBuilder builder = new StringBuilder("Traversal Explanation\n");
        for (int i = 0; i < (maxStrategyColumnLength + 7 + largestTraversalColumn); i++) {
            builder.append("=");
        }

        spacing(originalTraversal, maxStrategyColumnLength, builder);

        builder.append(wordWrap(getOriginalTraversalAsString(), maxTraversalColumn, newLineIndent));
        builder.append("\n\n");

        final List<Triplet<String,String,String>> intermediates = this.getIntermediates().collect(Collectors.toList());
        for (Triplet<String,String,String> t : intermediates) {
            builder.append(t.getValue0());
            int spacesToAdd = maxStrategyColumnLength - t.getValue0().length() + 1;
            for (int i = 0; i < spacesToAdd; i++) {
                builder.append(" ");
            }
            builder.append("[").append(t.getValue1().substring(0, 1)).append("]");
            for (int i = 0; i < 3; i++) {
                builder.append(" ");
            }
            builder.append(wordWrap(t.getValue2(), maxTraversalColumn, newLineIndent)).append("\n");
        }

        spacing(finalTraversal, maxStrategyColumnLength, builder);

        builder.append(wordWrap((intermediates.size() > 0 ?
                intermediates.get(intermediates.size() - 1).getValue2() :
                getOriginalTraversalAsString()), maxTraversalColumn, newLineIndent));
        return builder.toString();
    }
A pretty-print representation of the traversal explanation.

@return a {@link String} representation of the traversal explanation
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AbstractExplanation.java