Package com.singularsys.jepexamples.consoles

# Class PrefixDumperConsole

java.lang.Object
com.singularsys.jepexamples.consoles.Console
com.singularsys.jepexamples.consoles.PrefixDumperConsole

public class PrefixDumperConsole extends Console
A console application which dumps the tree representing an equation and statistics about the tree.

See Also:
  - `TreeAnalyzer`
  - `PrefixTreeDumper`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.singularsys.jepexamples.consoles.Console

  `Console.JepOutputStream, Console.JepPrintStream, Console.NodeRes, Console.SPEC_ACTION`

- ## Field Summary

  ### Fields inherited from class com.singularsys.jepexamples.consoles.Console

  `altered, doubleFormat, history, jep, showHistory`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PrefixDumperConsole()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `initialise()`
  sets up all the needed objects.
  `static void`
  `main(String[] args)`
  `void`
  `printHelp()`
  Print help message.
  `Object`
  `processEquation(Node node)`
  Performs the required operation on a node.
  `Console.SPEC_ACTION`
  `testSpecialCommands(String command)`
  Checks for special commands.

  ### Methods inherited from class com.singularsys.jepexamples.consoles.Console

  `clearVars, finaliseCommand, getCommand, getHistory, getJep, getPrompt, handleError, inputLoop, parseEvaluate, print, printFunctionEntry, printFuns, printHistory, printIntroText, println, printOps, printStdHelp, printVars, processCommand, run, setAlteredCommand, setEvaluator, setFormat, setFormat, setIndexShift, setMonitor, showCalls, showTree, split, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PrefixDumperConsole

    public PrefixDumperConsole()

- ## Method Details

  - ### main

    public static void main(String[] args)

  - ### initialise

    public void initialise()
    Description copied from class: `Console`
    sets up all the needed objects.
    Overrides:
      `initialise` in class `Console`

  - ### processEquation

    public Object processEquation(Node node) throws JepException
    Description copied from class: `Console`
    Performs the required operation on a node. Typically, evaluates the node and prints the value.
    Overrides:
      `processEquation` in class `Console`
    Parameters:
      `node` - Node representing expression
    Returns:
      The result of the calculation
    Throws:
      `JepException` - if a Parse or evaluation error

  - ### printHelp

    public void printHelp()
    Description copied from class: `Console`
    Print help message.
    Overrides:
      `printHelp` in class `Console`

  - ### testSpecialCommands

    public Console.SPEC_ACTION testSpecialCommands(String command)
    Description copied from class: `Console`
    Checks for special commands. For example a subclass may have a verbose mode switched on of off using the command

         verbose on

    This method can be used detected this input, perform required actions and skip normal processing by returning true.

    In general subclasses should call the superclass methods to test for special commands that class implements

    Overrides:
      `testSpecialCommands` in class `Console`
    Parameters:
      `command` -
    Returns:
      One of
      - SPEC_ACTION.CONTINUE - continue parsing and evaluation this equation,
      - SPEC_ACTION.BREAK - stop processing this equation and add it to the history
      - SPEC_ACTION.EMPTY - stop processing this equation does not add it to the history
      - SPEC_ACTION.ALTERED - the input text has been altered, reprocess the new text
      - SPEC_ACTION.EXIT stop the program
    See Also:
      - `Console.split(String)`