/** * Print every value on a separate line. Use tabs (<code>\t</code>) for indentation. * * @return A PrettyPrint instance for wrapped mode with tab indentation */ public static PrettyPrint singleLine() { return new PrettyPrint(null); }
/** * Do not break lines, but still insert whitespace between values. * * @return A PrettyPrint instance for single-line mode */ public static PrettyPrint indentWithTabs() { return new PrettyPrint(new char[] {'\t'}); }
/** * Print every value on a separate line. Use the given number of spaces for indentation. * * @param number * the number of spaces to use * @return A PrettyPrint instance for wrapped mode with spaces indentation */ public static PrettyPrint indentWithSpaces(int number) { if (number < 0) { throw new IllegalArgumentException("number is negative"); } char[] chars = new char[number]; Arrays.fill(chars, ' '); return new PrettyPrint(chars); }
/** * Print every value on a separate line. Use tabs (<code>\t</code>) for indentation. * * @return A PrettyPrint instance for wrapped mode with tab indentation */ public static PrettyPrint singleLine() { return new PrettyPrint(null); }
/** * Do not break lines, but still insert whitespace between values. * * @return A PrettyPrint instance for single-line mode */ public static PrettyPrint indentWithTabs() { return new PrettyPrint(new char[] {'\t'}); }
/** * Print every value on a separate line. Use tabs (<code>\t</code>) for indentation. * * @return A PrettyPrint instance for wrapped mode with tab indentation */ public static PrettyPrint singleLine() { return new PrettyPrint(null); }
/** * Do not break lines, but still insert whitespace between values. * * @return A PrettyPrint instance for single-line mode */ public static PrettyPrint indentWithTabs() { return new PrettyPrint(new char[] {'\t'}); }
/** * Print every value on a separate line. Use the given number of spaces for indentation. * * @param number * the number of spaces to use * @return A PrettyPrint instance for wrapped mode with spaces indentation */ public static PrettyPrint indentWithSpaces(int number) { if (number < 0) { throw new IllegalArgumentException("number is negative"); } char[] chars = new char[number]; Arrays.fill(chars, ' '); return new PrettyPrint(chars); }
/** * Print every value on a separate line. Use the given number of spaces for indentation. * * @param number * the number of spaces to use * @return A PrettyPrint instance for wrapped mode with spaces indentation */ public static PrettyPrint indentWithSpaces(int number) { if (number < 0) { throw new IllegalArgumentException("number is negative"); } char[] chars = new char[number]; Arrays.fill(chars, ' '); return new PrettyPrint(chars); }