Package com.singularsys.jep

# Class PrintVisitor.NullPrintVisitor

java.lang.Object
com.singularsys.jep.PrintVisitor
com.singularsys.jep.PrintVisitor.NullPrintVisitor

All Implemented Interfaces:
  `JepComponent`, `ParserVisitor`, `Serializable`

Enclosing class:
  `PrintVisitor`

public static class PrintVisitor.NullPrintVisitor extends PrintVisitor
A do-nothing version of a PrintVisitor for reducing memory usage.

Since:
  3.5
Author:
  Richard Morris
See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.singularsys.jep.PrintVisitor

  `PrintVisitor.NullPrintVisitor, PrintVisitor.PrintRulesI, PrintVisitor.StdElePrintRule, PrintVisitor.StdListPrintRule`

- ## Field Summary

  ### Fields inherited from class com.singularsys.jep.PrintVisitor

  `COMPLEX_I, format, fp, FULL_BRACKET, FunctionArgSep, FunLBracket, FunRBracket, LBracket, mode, NULL_PRINT_VISITOR, ot, RBracket, sb, specialFunRules, specialRules, specialVarName`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addSpecialRule(Operator op, PrintVisitor.PrintRulesI rule)`
  Adds a special print rule to be added for a given operator.
  `void`
  `addSpecialRule(String funName, PrintVisitor.PrintRulesI rule)`
  Adds a special print rule to be added for a given function.
  `String`
  `addSpecialVarName(String oldName, String newName)`
  Allows a replacement for a specific variable name
  `JepComponent`
  `getLightWeightInstance()`
  Returns this
  `PrintVisitor.PrintRulesI`
  `getSpecialFunRule(String key)`
  Finds the special rule, if any, associated with an operator.
  `PrintVisitor.PrintRulesI`
  `getSpecialRule(Operator key)`
  Finds the special rule, if any, associated with an operator.
  `String`
  `getSpecialVarName(String key)`
  Finds the replacement string, if any, associated with a variable.
  `void`
  `init(Jep jep)`
  Initialize the component.

  ### Methods inherited from class com.singularsys.jep.PrintVisitor

  `append, formatValue, formatValue, getFunArgSep, getFunLBracket, getFunRBracket, getLBracket, getMaxLen, getMode, getMode, getRBracket, print, print, printBrackets, println, println, printNoBrackets, printWrap, setFunArgSep, setFunLBracket, setFunRBracket, setLBracket, setMaxLen, setMode, setNumberFormat, setRBracket, testLeft, testMid, testRight, toString, visit, visit, visit, visit, visit, visitBinary, visitNaryBinary, visitUnary`

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

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

- ## Method Details

  - ### init

    public void init(Jep jep)
    Description copied from interface: `JepComponent`
    Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
    Specified by:
      `init` in interface `JepComponent`
    Overrides:
      `init` in class `PrintVisitor`
    Parameters:
      `jep` - the current Jep instance

  - ### getLightWeightInstance

    public JepComponent getLightWeightInstance()
    Returns this
    Specified by:
      `getLightWeightInstance` in interface `JepComponent`
    Overrides:
      `getLightWeightInstance` in class `PrintVisitor`
    Returns:
      either a new instance, null or 'this'.

  - ### addSpecialRule

    public void addSpecialRule(Operator op, PrintVisitor.PrintRulesI rule)
    Description copied from class: `PrintVisitor`
    Adds a special print rule to be added for a given operator.
    Overrides:
      `addSpecialRule` in class `PrintVisitor`
    Parameters:
      `op` - the operator the rule applies to
      `rule` - the print rule to use

  - ### addSpecialRule

    public void addSpecialRule(String funName, PrintVisitor.PrintRulesI rule)
    Description copied from class: `PrintVisitor`
    Adds a special print rule to be added for a given function.
    Overrides:
      `addSpecialRule` in class `PrintVisitor`
    Parameters:
      `funName` - name of function
      `rule` - the print rule to use

  - ### getSpecialRule

    public PrintVisitor.PrintRulesI getSpecialRule(Operator key)
    Description copied from class: `PrintVisitor`
    Finds the special rule, if any, associated with an operator.
    Overrides:
      `getSpecialRule` in class `PrintVisitor`
    Parameters:
      `key` - the Operator
    Returns:
      the rule or null, if there is no special rule

  - ### getSpecialFunRule

    public PrintVisitor.PrintRulesI getSpecialFunRule(String key)
    Description copied from class: `PrintVisitor`
    Finds the special rule, if any, associated with an operator.
    Overrides:
      `getSpecialFunRule` in class `PrintVisitor`
    Parameters:
      `key` - name of the function
    Returns:
      the rule or null, if there is no special rule

  - ### getSpecialVarName

    public String getSpecialVarName(String key)
    Description copied from class: `PrintVisitor`
    Finds the replacement string, if any, associated with a variable.
    Overrides:
      `getSpecialVarName` in class `PrintVisitor`
    Parameters:
      `key` - of the variable
    Returns:
      the name or null, if there is no special name

  - ### addSpecialVarName

    public String addSpecialVarName(String oldName, String newName)
    Description copied from class: `PrintVisitor`
    Allows a replacement for a specific variable name
    Overrides:
      `addSpecialVarName` in class `PrintVisitor`
    Parameters:
      `oldName` - name of variable to replace
      `newName` - string to print as replacement