Package EDU.purdue.jtb.common
Class Spacing
- java.lang.Object
-
- EDU.purdue.jtb.common.Spacing
-
public class Spacing extends java.lang.ObjectClassSpacingmanages the indentation information for pretty printing.Class maintains a state, and is not supposed to be run in parallel threads (on the same generated class).
-
-
Field Summary
Fields Modifier and Type Field Description intindentLevelThe indentation leveljava.lang.StringspcThe indentation string
-
Constructor Summary
Constructors Constructor Description Spacing(int aIndentAmt)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()Returns the indentation string corresponding to the indentation amount and level.voidupdateSpc(int numIndentLvls)Updates the indentation.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns the indentation string corresponding to the indentation amount and level.- Overrides:
toStringin classjava.lang.Object
-
updateSpc
public void updateSpc(int numIndentLvls)
Updates the indentation.- Parameters:
numIndentLvls- - the (positive or negative) indentation level delta.
-
-