Package org.snakeyaml.engine.v2.emitter
Class ScalarAnalysis
- java.lang.Object
-
- org.snakeyaml.engine.v2.emitter.ScalarAnalysis
-
public final class ScalarAnalysis extends Object
Accumulate information to choose the scalar style
-
-
Constructor Summary
Constructors Constructor Description ScalarAnalysis(String scalar, boolean empty, boolean multiline, boolean allowFlowPlain, boolean allowBlockPlain, boolean allowSingleQuoted, boolean allowBlock)Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetScalar()getterbooleanisAllowBlock()getterbooleanisAllowBlockPlain()getterbooleanisAllowFlowPlain()getterbooleanisAllowSingleQuoted()getterbooleanisEmpty()getterbooleanisMultiline()getter
-
-
-
Constructor Detail
-
ScalarAnalysis
public ScalarAnalysis(String scalar, boolean empty, boolean multiline, boolean allowFlowPlain, boolean allowBlockPlain, boolean allowSingleQuoted, boolean allowBlock)
Create- Parameters:
scalar- - the data to analyseempty- - true for empty scalarmultiline- - true if it may take many linesallowFlowPlain- - true if can be plain in flow contextallowBlockPlain- - true if can be plain in block contextallowSingleQuoted- - true if single quotes are allowedallowBlock- - true if block style is alowed
-
-
Method Detail
-
getScalar
public String getScalar()
getter- Returns:
- the scalar to be analysed
-
isEmpty
public boolean isEmpty()
getter- Returns:
- true when empty
-
isMultiline
public boolean isMultiline()
getter- Returns:
- true if it may take many lines
-
isAllowFlowPlain
public boolean isAllowFlowPlain()
getter- Returns:
- true if can be plain in flow context
-
isAllowBlockPlain
public boolean isAllowBlockPlain()
getter- Returns:
- true if can be plain in block context
-
isAllowSingleQuoted
public boolean isAllowSingleQuoted()
getter- Returns:
- true if single quotes are allowed
-
isAllowBlock
public boolean isAllowBlock()
getter- Returns:
- true when block style is allowed for this scalar
-
-