Package org.eclipse.handly.util

# Class IndentPolicy

java.lang.Object
org.eclipse.handly.util.IndentPolicy

public class IndentPolicy extends Object
Encapsulates an indentation policy such as the indentation unit and line separator used.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IndentPolicy()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appendIndent(StringBuilder builder)`
  Appends an indentation unit to the given string builder.
  `void`
  `appendIndent(StringBuilder builder, int n)`
  Appends the given number of indentation units to the given string builder.
  `void`
  `appendLine(StringBuilder builder)`
  Appends a line separator to the given string builder.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IndentPolicy

    public IndentPolicy()

- ## Method Details

  - ### appendIndent

    public void appendIndent(StringBuilder builder)
    Appends an indentation unit to the given string builder.
    Parameters:
      `builder` - a string builder (not `null`)

  - ### appendIndent

    public void appendIndent(StringBuilder builder, int n)
    Appends the given number of indentation units to the given string builder.

    This implementation calls `appendIndent(StringBuilder)` the specified number of times.

    Parameters:
      `builder` - a string builder (not `null`)
      `n` - the number of indentation units to append

  - ### appendLine

    public void appendLine(StringBuilder builder)
    Appends a line separator to the given string builder.
    Parameters:
      `builder` - a string builder (not `null`)