Class MultilineValue
- java.lang.Object
-
- ru.vyarus.yaml.updater.parse.comments.util.MultilineValue
-
public final class MultilineValue extends java.lang.ObjectYaml multi-line value detector utility.- Since:
- 07.05.2021
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultilineValue.MarkerMulti-line value descriptor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancouldBeFlowMultiline(java.lang.String value)static MultilineValue.Markerdetect(java.lang.String line)Detect multi-line marker at the end of the line.static MultilineValue.MarkerflowMarker(int indent)Flow multiline value is a value spanning multiple lines without additional markers.
-
-
-
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
-
-