Package output

Class OutputBinary

Object
OutputBinary
All Implemented Interfaces:
OutputFunction

public class OutputBinary
extends Object
implements OutputFunction
Provides a parent class for all OutputFunctions of two arguments
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected OutputFunction first
    The first operand of the function
    protected String functionName
    The name of the function
    protected OutputFunction second
    The second operand of the function
  • Constructor Summary

    Constructors 
    Constructor Description
    OutputBinary​(String functionName, OutputFunction first, OutputFunction second)
    Returns a new OutputBinary function
  • 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

    • OutputBinary

      public OutputBinary​(String functionName, OutputFunction first, OutputFunction second)
      Returns a new OutputBinary function
      Parameters:
      functionName - the name of the function
      first - the first operand of the function
      second - the second operand of the function
  • 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