Package de.sfuhrm.sudoku.output
Class LatexTableFormatter
- java.lang.Object
-
- de.sfuhrm.sudoku.output.LatexTableFormatter
-
- All Implemented Interfaces:
GameMatrixFormatter
public final class LatexTableFormatter extends java.lang.ObjectFormats 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.StringdocumentEnd()Formats the document end part.java.lang.StringdocumentStart()Formats the document start part.java.lang.Stringformat(GameMatrix matrix)Formats the input game matrix to a text representation.java.lang.StringgetLineSeparator()Gets the line separator String to use.java.lang.StringgetUnknownCellContentCharacter()Gets the String to use for unknown/unset cells.voidsetLineSeparator(java.lang.String newLineSeparator)Sets the line separator String to use.voidsetUnknownCellContentCharacter(java.lang.String newUnknownCellContentCharacter)Sets the String to use for unknown/unset cells.
-
-
-
Method Detail
-
format
public java.lang.String format(GameMatrix matrix)
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
public java.lang.String documentStart()
Description copied from interface:GameMatrixFormatterFormats the document start part.- Specified by:
documentStartin interfaceGameMatrixFormatter- Returns:
- a String representation of the document start.
-
documentEnd
public java.lang.String documentEnd()
Description copied from interface:GameMatrixFormatterFormats the document end part.- Specified by:
documentEndin interfaceGameMatrixFormatter- 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.
-
-