Here you can find the source of indent(final StringBuilder sb, final int indent)
Parameter | Description |
---|---|
sb | StringBuilder to write in. |
indent | The number (level) of indents. |
private static final void indent(final StringBuilder sb, final int indent)
//package com.java2s; public class Main { /** Indent for each line (dependent of the level of indent). */ public static final String LOG_OUT_INDENT = " "; /**/*from w w w . j a va 2 s . co m*/ * Appends to a given StringBuilder the given indents depending on the indent level. * * @param sb StringBuilder to write in. * @param indent The number (level) of indents. */ private static final void indent(final StringBuilder sb, final int indent) { for (int i = 0; i < indent; i++) { sb.append(LOG_OUT_INDENT); } } }