Package de.sfuhrm.sudoku.output
Class LatexTableFormatter
java.lang.Object
de.sfuhrm.sudoku.output.LatexTableFormatter
- All Implemented Interfaces:
GameMatrixFormatter
Formats the game matrix to a LaTeX document.
- Author:
- Stephan Fuhrmann
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFormats the document end part.Formats the document start part.format(de.sfuhrm.sudoku.GameMatrix matrix) Formats the input game matrix to a text representation.final StringGets the column separator String to use.final StringGets the row separator String to use.final StringGets the String to use for unknown/unset cells.final voidsetColumnSeparator(String newColumnSeparator) Sets the column separator String to use.final voidsetRowSeparator(String newRowSeparator) Sets the row separator String to use.final voidsetUnknownCellContentCharacter(String newUnknownCellContentCharacter) Sets the String to use for unknown/unset cells.
-
Constructor Details
-
LatexTableFormatter
public LatexTableFormatter()Constructs a new instance.
-
-
Method Details
-
format
Description copied from interface:GameMatrixFormatterFormats 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
Description copied from interface:GameMatrixFormatterFormats the document start part.- Specified by:
documentStartin interfaceGameMatrixFormatter- Returns:
- a String representation of the document start.
-
documentEnd
Description copied from interface:GameMatrixFormatterFormats the document end part.- Specified by:
documentEndin interfaceGameMatrixFormatter- Returns:
- a String representation of the document end.
-
getUnknownCellContentCharacter
Gets the String to use for unknown/unset cells.- Returns:
- the unknown cell content String.
-
setUnknownCellContentCharacter
Sets the String to use for unknown/unset cells.- Parameters:
newUnknownCellContentCharacter- the new value for unknown cells.
-
getRowSeparator
Gets the row separator String to use.- Returns:
- the row separator String.
-
setRowSeparator
Sets the row separator String to use.- Parameters:
newRowSeparator- the new String to use as row separator.
-
getColumnSeparator
Gets the column separator String to use.- Returns:
- the column separator String.
-
setColumnSeparator
Sets the column separator String to use.- Parameters:
newColumnSeparator- the new String to use as column separator.
-