Class MarkdownTableFormatter

java.lang.Object
de.sfuhrm.sudoku.output.MarkdownTableFormatter
All Implemented Interfaces:
GameMatrixFormatter

public final class MarkdownTableFormatter extends Object
Formats the game matrix to a markdown table.
Author:
Stephan Fuhrmann
  • Constructor Details

    • MarkdownTableFormatter

      public MarkdownTableFormatter()
  • Method Details

    • format

      public String format(de.sfuhrm.sudoku.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.
    • getUnknownCellContentCharacter

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

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

      public final String getRowSeparator()
      Gets the row separator String to use.
      Returns:
      the row separator String.
    • setRowSeparator

      public final void setRowSeparator(String newRowSeparator)
      Sets the row separator String to use.
      Parameters:
      newRowSeparator - the new String to use as row separator.
    • getColumnSeparator

      public final String getColumnSeparator()
      Gets the column separator String to use.
      Returns:
      the column separator String.
    • setColumnSeparator

      public final void setColumnSeparator(String newColumnSeparator)
      Sets the column separator String to use.
      Parameters:
      newColumnSeparator - the new String to use as column separator.
    • documentStart

      public 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 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.