Class TreeStringUtils


  • public final class TreeStringUtils
    extends java.lang.Object
    String utilities related to yaml model trees.
    Since:
    21.05.2021
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String fillTo​(java.lang.String line, int length)
      Appends whitespace to line to increase its length.
      static java.lang.String shiftRight​(java.lang.String line, int length)
      Appends whitespace before line.
      static java.lang.String whitespace​(int length)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • whitespace

        public static java.lang.String whitespace​(int length)
        Parameters:
        length - number of whitespace characters to aggregate
        Returns:
        string with specified number of whitespace characters
      • shiftRight

        public static java.lang.String shiftRight​(java.lang.String line,
                                                  int length)
        Appends whitespace before line.
        Parameters:
        line - line to prepend whitespace
        length - number of whitespace chars to prepend
        Returns:
        line with prepended whitespace
      • fillTo

        public static java.lang.String fillTo​(java.lang.String line,
                                              int length)
        Appends whitespace to line to increase its length.
        Parameters:
        line - line to increase
        length - target line length
        Returns:
        line is appended whitespace (if required) not less then specified length