Class AbstractExplanation

  • Direct Known Subclasses:

    public abstract class AbstractExplanation
    extends Object
    Base class for "TraversalExplanation" instances and centralizes the key functionality which is the job of doing prettyPrint().
    Stephen Mallette (
    • 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.
      • prettyPrint

        public String prettyPrint()
      • prettyPrint

        public String prettyPrint​(int maxLineLength)
        A pretty-print representation of the traversal explanation.
        a String representation of the traversal explanation
      • spacing

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