public class TMFFUnformatted extends TMFFMethod
maxDepth
Constructor and Description |
---|
TMFFUnformatted()
Standard constructor for TMFFUnformatted.
|
Modifier and Type | Method and Description |
---|---|
org.json.JSONArray |
asArray()
Output the array form of this method's parameters.
|
int |
renderFormula(TMFFStateParams tmffSP,
ParseTree parseTree,
Formula formula)
Outputs a formula and outputs it to a StringBuilder without doing the
special TMFF formatting.
|
protected int |
renderSubExprWithBreaks(TMFFStateParams tmffSP,
ParseNode currNode,
int leftmostColNbr) |
boolean |
updateMaxDepth(int maxDepth)
Updates maxDepth for a TMFFMethod if the Method allows updates.
|
constructMethodWithUserParams, renderSubExpr, validateMaxDepth, validateMaxDepth
public TMFFUnformatted()
Sets maxDepth to Integer.MAX_VALUE so that no depth breaks are triggered.
public org.json.JSONArray asArray()
TMFFMethod
asArray
in class TMFFMethod
public int renderFormula(TMFFStateParams tmffSP, ParseTree parseTree, Formula formula)
This method overrides the TMFFMethod renderFormula() method! It provides a fallback for cases when the TMFF algorithm fails (e.g. excessive indentation for line length.)
renderFormula
in class TMFFMethod
tmffSP
- TMFFStateParams initialized, ready for use.parseTree
- ParseTree for the formula to be formatted. NOT USED in
this override method!formula
- formula to be formatted.protected int renderSubExprWithBreaks(TMFFStateParams tmffSP, ParseNode currNode, int leftmostColNbr)
renderSubExprWithBreaks
in class TMFFMethod
public boolean updateMaxDepth(int maxDepth)
As of the initial release, only TMFFAlignColumn uses maxDepth. The methods TMFFFlat and TMFFUnformatted have maxDepth = Integer.MAX_VALUE which results in no maxDepth line breaks from happening -- therefore, they do not allow updates after initial construction of the method.
updateMaxDepth
in class TMFFMethod
maxDepth
- parameter.