Class ScalarAnalysis

java.lang.Object
org.snakeyaml.engine.v2.emitter.ScalarAnalysis

public final class ScalarAnalysis extends Object
Accumulate information to choose the scalar style
  • Field Details

    • scalar

      private final String scalar
    • empty

      private final boolean empty
    • multiline

      private final boolean multiline
    • allowFlowPlain

      private final boolean allowFlowPlain
    • allowBlockPlain

      private final boolean allowBlockPlain
    • allowSingleQuoted

      private final boolean allowSingleQuoted
    • allowBlock

      private final boolean allowBlock
  • Constructor Details

    • ScalarAnalysis

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

    • 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