Class LatexTableFormatter

  • All Implemented Interfaces:
    GameMatrixFormatter

    public final class LatexTableFormatter
    extends java.lang.Object
    Formats the game matrix to a LaTeX document.
    Author:
    Stephan Fuhrmann
    • Constructor Summary

      Constructors 
      Constructor Description
      LatexTableFormatter()
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String documentEnd()
      Formats the document end part.
      java.lang.String documentStart()
      Formats the document start part.
      java.lang.String format​(GameMatrix matrix)
      Formats the input game matrix to a text representation.
      java.lang.String getLineSeparator()
      Gets the line separator String to use.
      java.lang.String getUnknownCellContentCharacter()
      Gets the String to use for unknown/unset cells.
      void setLineSeparator​(java.lang.String newLineSeparator)
      Sets the line separator String to use.
      void setUnknownCellContentCharacter​(java.lang.String newUnknownCellContentCharacter)
      Sets the String to use for unknown/unset cells.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LatexTableFormatter

        public LatexTableFormatter()
        Constructs a new instance.
    • Method Detail

      • format

        public java.lang.String format​(GameMatrix matrix)
        Description copied from interface: GameMatrixFormatter
        Formats the input game matrix to a text representation.
        Parameters:
        matrix - the matrix to format to String format.
        Returns:
        a String representation of the game matrix.
      • documentStart

        public java.lang.String documentStart()
        Description copied from interface: GameMatrixFormatter
        Formats the document start part.
        Specified by:
        documentStart in interface GameMatrixFormatter
        Returns:
        a String representation of the document start.
      • documentEnd

        public java.lang.String documentEnd()
        Description copied from interface: GameMatrixFormatter
        Formats the document end part.
        Specified by:
        documentEnd in interface GameMatrixFormatter
        Returns:
        a String representation of the document end.
      • getUnknownCellContentCharacter

        public final java.lang.String getUnknownCellContentCharacter()
        Gets the String to use for unknown/unset cells.
        Returns:
        the unknown cell content String.
      • setUnknownCellContentCharacter

        public final void setUnknownCellContentCharacter​(java.lang.String newUnknownCellContentCharacter)
        Sets the String to use for unknown/unset cells.
        Parameters:
        newUnknownCellContentCharacter - the new value for unknown cells.
      • getLineSeparator

        public final java.lang.String getLineSeparator()
        Gets the line separator String to use.
        Returns:
        the line separator String.
      • setLineSeparator

        public final void setLineSeparator​(java.lang.String newLineSeparator)
        Sets the line separator String to use.
        Parameters:
        newLineSeparator - the new String to use as line separator.