Package output

Class OutputParenthesizer

Object
OutputParenthesizer
All Implemented Interfaces:
OutputFunction

public class OutputParenthesizer
extends Object
implements OutputFunction
An OutputFunction that simply parenthesizes its operand
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected OutputFunction operand
    The operand to be parenthesized
  • Constructor Summary

    Constructors 
    Constructor Description
    OutputParenthesizer​(OutputFunction operand)
    Returns a new OutputParenthesizer
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object that)
    Checks if this OutputFunction is equal to that
    String getName()
    Returns the name of this function
    Collection<OutputFunction> getOperands()
    Returns the operands of this function (its children in the function tree)
    int hashCode()
    Returns a hash code value for this object
    String toLatex()
    Returns a LaTeX representation of the function tree
    String toString()
    Returns a text representation of the function tree

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • OutputParenthesizer

      public OutputParenthesizer​(OutputFunction operand)
      Returns a new OutputParenthesizer
      Parameters:
      operand - the function to be parenthesized
  • Method Details

    • getName

      public String getName()
      Description copied from interface: OutputFunction
      Returns the name of this function
      Specified by:
      getName in interface OutputFunction
      Returns:
      the name of this function
    • getOperands

      public Collection<OutputFunction> getOperands()
      Description copied from interface: OutputFunction
      Returns the operands of this function (its children in the function tree)
      Specified by:
      getOperands in interface OutputFunction
      Returns:
      a collection of operands
    • toString

      public String toString()
      Description copied from interface: OutputFunction
      Returns a text representation of the function tree
      Specified by:
      toString in interface OutputFunction
      Overrides:
      toString in class Object
      Returns:
      a text representation of the function tree
    • toLatex

      public String toLatex()
      Description copied from interface: OutputFunction
      Returns a LaTeX representation of the function tree
      Specified by:
      toLatex in interface OutputFunction
      Returns:
      a LaTeX representation of the function tree
    • equals

      public boolean equals​(Object that)
      Description copied from interface: OutputFunction
      Checks if this OutputFunction is equal to that
      Specified by:
      equals in interface OutputFunction
      Overrides:
      equals in class Object
      Parameters:
      that - the object to be compared against
      Returns:
      true if they're equal
    • hashCode

      public int hashCode()
      Description copied from interface: OutputFunction
      Returns a hash code value for this object
      Specified by:
      hashCode in interface OutputFunction
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object