Class MultilineValue


  • public final class MultilineValue
    extends java.lang.Object
    Yaml multi-line value detector utility.
    Since:
    07.05.2021
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MultilineValue.Marker
      Multi-line value descriptor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean couldBeFlowMultiline​(java.lang.String value)  
      static MultilineValue.Marker detect​(java.lang.String line)
      Detect multi-line marker at the end of the line.
      static MultilineValue.Marker flowMarker​(int indent)
      Flow multiline value is a value spanning multiple lines without additional markers.
      • Methods inherited from class java.lang.Object

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

      • detect

        public static MultilineValue.Marker detect​(java.lang.String line)
        Detect multi-line marker at the end of the line.
        Parameters:
        line - line to check
        Returns:
        marker descriptor or null if not found
      • couldBeFlowMultiline

        public static boolean couldBeFlowMultiline​(java.lang.String value)
        Parameters:
        value - line to analyze
        Returns:
        true if line contains any "value" that could potentially continue as flow multiline value
      • flowMarker

        public static MultilineValue.Marker flowMarker​(int indent)
        Flow multiline value is a value spanning multiple lines without additional markers. The only rule is the following lines should not have smaller padding.
        Parameters:
        indent - value indent (actually, leading property indent)
        Returns:
        flow multiline descriptor