Class 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 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.
        Returns:
        a String representation of the traversal explanation
      • spacing

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