Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.emitter

public final Class ScalarAnalysis

extends Object
Class Inheritance

Accumulate information to choose the scalar style

Field Summary

Modifier and TypeField and Description
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final String

Constructor Summary

AccessConstructor and Description
public
ScalarAnalysis(String
- the data to analyse
scalar
,
boolean
- true for empty scalar
empty
,
boolean
- true if it may take many lines
multiline
,
boolean
- true if can be plain in flow context
allowFlowPlain
,
boolean
- true if can be plain in block context
allowBlockPlain
,
boolean
- true if single quotes are allowed
allowSingleQuoted
,
boolean
- true if block style is alowed
allowBlock
)

Create

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the scalar to be analysed
getScalar
()

getter

public boolean

Returns:

true when block style is allowed for this scalar
isAllowBlock
()

getter

public boolean

Returns:

true if can be plain in block context
isAllowBlockPlain
()

getter

public boolean

Returns:

true if can be plain in flow context
isAllowFlowPlain
()

getter

public boolean

Returns:

true if single quotes are allowed
isAllowSingleQuoted
()

getter

public boolean

Returns:

true when empty
isEmpty
()

getter

public boolean

Returns:

true if it may take many lines
isMultiline
()

getter

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowBlockback to summary
private final boolean allowBlock
allowBlockPlainback to summary
private final boolean allowBlockPlain
allowFlowPlainback to summary
private final boolean allowFlowPlain
allowSingleQuotedback to summary
private final boolean allowSingleQuoted
emptyback to summary
private final boolean empty
multilineback to summary
private final boolean multiline
scalarback to summary
private final String scalar

Constructor Detail

ScalarAnalysisback to summary
public ScalarAnalysis(String scalar, boolean empty, boolean multiline, boolean allowFlowPlain, boolean allowBlockPlain, boolean allowSingleQuoted, boolean allowBlock)

Create

Parameters
scalar:String

- the data to analyse

empty:boolean

- true for empty scalar

multiline:boolean

- true if it may take many lines

allowFlowPlain:boolean

- true if can be plain in flow context

allowBlockPlain:boolean

- true if can be plain in block context

allowSingleQuoted:boolean

- true if single quotes are allowed

allowBlock:boolean

- true if block style is alowed

Method Detail

getScalarback to summary
public String getScalar()

getter

Returns:String

the scalar to be analysed

isAllowBlockback to summary
public boolean isAllowBlock()

getter

Returns:boolean

true when block style is allowed for this scalar

isAllowBlockPlainback to summary
public boolean isAllowBlockPlain()

getter

Returns:boolean

true if can be plain in block context

isAllowFlowPlainback to summary
public boolean isAllowFlowPlain()

getter

Returns:boolean

true if can be plain in flow context

isAllowSingleQuotedback to summary
public boolean isAllowSingleQuoted()

getter

Returns:boolean

true if single quotes are allowed

isEmptyback to summary
public boolean isEmpty()

getter

Returns:boolean

true when empty

isMultilineback to summary
public boolean isMultiline()

getter

Returns:boolean

true if it may take many lines