Module aya.pretty

Interface Doc

All Superinterfaces:
Docile
All Known Implementing Classes:
Doc.Cat, Doc.CodeBlock, Doc.Column, Doc.Empty, Doc.EscapedText, Doc.FlatAlt, Doc.HyperLinked, Doc.Image, Doc.InlineCode, Doc.Line, Doc.List, Doc.Nest, Doc.Nesting, Doc.PageWidth, Doc.PlainText, Doc.SpecialSymbol, Doc.Styled, Doc.Union

This class reimplemented Haskell PrettyPrint library's Doc module.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Concatenation of two documents
    static final record 
    Code block, with special escape settings compared to Doc.PlainText
    static final record 
    A document that will react on the current cursor position.
    static final record 
    The empty document; conceptually the unit of 'Cat'
    static final record 
    Already escaped text, which will not be escaped by backend.
    static final record 
    Lay out the defaultDoc 'Doc', but when flattened (via 'group'), prefer the preferWhenFlatten.
    static final record 
    A clickable text line without '\n'.
    static final record 
     
    static final record 
    Inline code, with special escape settings compared to Doc.PlainText
    static final record 
    Hard line break
    static final record 
     
    static final record 
    Document indented by a number of columns
    static final record 
    A document that will react on the current nest level.
    static final record 
    A document that will react on the page width.
    static final record 
    A plain text line without '\n'.
    static final record 
    A special symbol that may get rendered in a special way
    static final record 
    Styled document
    static final record 
    The first lines of first document should be shorter than the first lines of the second one, so the layout algorithm can pick the one that fits best.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final @NotNull Doc
     
    static final @NotNull Doc
     
    static final @NotNull Doc
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull Doc
    align(@NotNull Doc doc)
    align lays out the document with the nesting level set to the current column.
    static @NotNull Doc
    angled(Doc doc)
     
    default @NotNull kala.collection.SeqLike<Doc>
     
    static @NotNull Doc
    braced(Doc doc)
     
    static @NotNull Doc
    bracedUnless(Doc doc, boolean falsification)
     
    static @NotNull Doc
    bullet(Doc @NotNull ... docs)
     
    static @NotNull Doc
    cat(@NotNull kala.collection.SeqLike<Doc> docs)
    cat tries laying out the documents separated with nothing, and if this does not fit the page, separates them with newlines.
    static @NotNull Doc
    cat(Doc @NotNull ... docs)
     
    static @NotNull Doc
    catBlockL(int minBeforeRight, @NotNull kala.collection.SeqLike<Doc> left, @NotNull Doc delim, @NotNull kala.collection.SeqLike<Doc> right)
     
    static @NotNull Doc
    catBlockR(int minBeforeDelim, @NotNull kala.collection.SeqLike<Doc> left, @NotNull Doc delim, @NotNull kala.collection.SeqLike<Doc> right)
     
    static @NotNull Doc
    cblock(@NotNull Doc prefix, int indent, @NotNull Doc block)
    Creates a C-style indented block of statements.
    static @NotNull Doc
    code(@NotNull String code)
     
    static @NotNull Doc
    code(@NotNull String language, @NotNull Doc code)
     
    static @NotNull Doc
    code(@NotNull Doc code)
     
    static @NotNull Doc
    codeBlock(@NotNull String code)
     
    static @NotNull Doc
    codeBlock(@NotNull String language, @NotNull Doc code)
     
    static @NotNull Doc
    column(@NotNull IntFunction<Doc> docBuilder)
    Layout a document depending on which column it starts at.
    static @NotNull Doc
    commaList(@NotNull kala.collection.SeqLike<Doc> docs)
     
    default @NotNull String
    Produce unicode and 80-width output
    default @NotNull String
    Produce ASCII and infinite-width output
    static @NotNull Doc
    The empty document; conceptually the unit of 'Cat'
    static @NotNull Doc
    emptyIf(boolean cond, Supplier<@NotNull Doc> otherwise)
    Return conditional empty()
    static @NotNull Doc
     
    static @NotNull Doc
    Already escaped text that will be rendered as-is.
    static @NotNull Doc
    flatAlt(@NotNull Doc defaultDoc, @NotNull Doc preferWhenFlattened)
    By default, flatAlt renders as .
    static @NotNull Doc
    flatAltBracedBlock(Doc defaultDoc, Doc flatDoc)
    Either `{ defaultDoc }` or `{\nflatDoc\n}`
    static @NotNull Doc
    hang(int deltaNest, @NotNull Doc doc)
    hang lays out the document with a nesting level set to the /current column/ plus .
    static @NotNull Doc
    hyperLink(@NotNull String plain, @NotNull Link href)
     
    static @NotNull Doc
    hyperLink(@NotNull Doc doc, @NotNull Link href, @Nullable String hover)
     
    static @NotNull Doc
    image(@NotNull Doc alt, @NotNull Link src)
     
    static @NotNull Doc
    indent(int indent, @NotNull Doc doc)
    This method indent document by columns, * starting from the current cursor position.
    default boolean
     
    default boolean
     
    static @NotNull Doc
    join(@NotNull Doc delim, @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
     
    static @NotNull Doc
    join(@NotNull Doc delim, Doc @NotNull ... docs)
     
    static @NotNull Doc
    licit(boolean explicit, Doc doc)
     
    static @NotNull Doc
    Unconditionally line break
    static @NotNull Doc
    linkDef(@NotNull Doc doc, @NotNull Link id)
     
    static @NotNull Doc
    linkDef(@NotNull Doc doc, @NotNull Link id, @Nullable String hover)
     
    static @NotNull Doc
    linkRef(@NotNull Doc doc, @NotNull Link href)
     
    static @NotNull Doc
    linkRef(@NotNull Doc doc, @NotNull Link href, @Nullable String hover)
     
    static @NotNull Doc
    list(boolean isOrdered, @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
     
    static @NotNull Doc
    nest(int indent, @NotNull Doc doc)
    lays out the document with the current nesting level (indentation of the following lines) increased by .
    static @NotNull Doc
    nesting(@NotNull IntFunction<Doc> docBuilder)
    Layout a document depending on the current 'nest'-ing level.
    static @NotNull Doc
    ordered(Doc @NotNull ... docs)
     
    static @NotNull Doc
    ordinal(int n)
     
    static @NotNull Doc
    pageWidth(@NotNull IntFunction<Doc> docBuilder)
    Layout a document depending on the page width, if one has been specified.
    static @NotNull Doc
    par(int indent, @NotNull Doc doc)
    Paragraph indentation: indent by columns, and then indent the first line again by columns.
    static @NotNull Doc
    parened(Doc doc)
     
    static @NotNull Doc
    plain(String text)
    Plain text document.
    default <Out, Config extends PrinterConfig>
    Out
    render(@NotNull Printer<Out,Config> printer, Config config)
     
    default @NotNull String
     
    default @NotNull String
     
    default @NotNull String
    renderToHtml(boolean withHeader)
     
    default @NotNull String
     
    default @NotNull String
    renderToString(int pageWidth, boolean unicode)
     
    default @NotNull String
    renderToString(@NotNull StringPrinterConfig<?> config)
     
    default @NotNull String
     
    default @NotNull String
    renderToTerminal(int pageWidth, boolean unicode)
     
    default @NotNull String
     
    static @NotNull Doc
    sep(@NotNull kala.collection.SeqLike<Doc> docs)
     
    static @NotNull Doc
    sep(Doc @NotNull ... docs)
    fillSep concatenates the documents horizontally with a space as long as it fits the page, then inserts a 'line' and continues doing that for all documents in .
    static @NotNull Doc
    sepNonEmpty(@NotNull kala.collection.SeqLike<Doc> docs)
     
    static @NotNull Doc
    sepNonEmpty(Doc @NotNull ... docs)
     
    static @NotNull Doc
    spaced(Doc symbol)
     
    static @NotNull Doc
    spaces(int n)
     
    static @NotNull Doc
    splitL(int minBeforeRight, @NotNull Doc left, @NotNull Doc delim, @NotNull Doc right)
    Concat , and , with and occupying at least length.
    static @NotNull Doc
    splitR(int minBeforeDelim, @NotNull Doc left, @NotNull Doc delim, @NotNull Doc right)
    Concat , and , with occupying at least length.
    static @NotNull Doc
    stickySep(@NotNull kala.collection.SeqLike<@NotNull Doc> docs)
    stickySep concatenates all documents horizontally with a space, i.e.
    static @NotNull Doc
    stickySep(Doc @NotNull ... docs)
     
    static @NotNull Doc
    styled(@NotNull Style style, @NotNull String plain)
     
    static @NotNull Doc
    styled(@NotNull Style style, @NotNull Doc doc)
     
    static @NotNull Doc
    styled(@NotNull Styles builder, @NotNull String plain)
     
    static @NotNull Doc
    styled(@NotNull Styles builder, @NotNull Doc doc)
     
    static @NotNull Doc
    symbol(String text)
     
    default @NotNull Doc
     
    static @NotNull Doc
    vcat(@NotNull kala.collection.SeqLike<@NotNull Doc> docs)
     
    static @NotNull Doc
    vcat(Doc @NotNull ... docs)
     
    static @NotNull Doc
    vcatNonEmpty(@NotNull kala.collection.SeqLike<Doc> docs)
     
    static @NotNull Doc
    vcatNonEmpty(Doc @NotNull ... docs)
     
    static @NotNull Doc
    vcommaList(@NotNull kala.collection.SeqLike<Doc> docs)
     
    static @NotNull Doc
    wrap(String leftSymbol, String rightSymbol, Doc doc)
     
  • Field Details

    • ONE_WS

      @NotNull static final @NotNull Doc ONE_WS
    • ALT_WS

      @NotNull static final @NotNull Doc ALT_WS
    • COMMA

      @NotNull static final @NotNull Doc COMMA
  • Method Details

    • isNotEmpty

      default boolean isNotEmpty()
    • isEmpty

      default boolean isEmpty()
    • toDoc

      @NotNull default @NotNull Doc toDoc()
      Specified by:
      toDoc in interface Docile
    • asSeq

      @NotNull default @NotNull kala.collection.SeqLike<Doc> asSeq()
      Returns:
      a seq with cats flattened
    • renderToString

      @NotNull default @NotNull String renderToString(@NotNull @NotNull StringPrinterConfig<?> config)
    • renderToString

      @NotNull default @NotNull String renderToString(int pageWidth, boolean unicode)
    • renderToTerminal

      @NotNull default @NotNull String renderToTerminal()
    • renderToTerminal

      @NotNull default @NotNull String renderToTerminal(int pageWidth, boolean unicode)
    • renderToHtml

      @NotNull default @NotNull String renderToHtml()
    • renderToHtml

      @NotNull default @NotNull String renderToHtml(boolean withHeader)
    • renderToMd

      @NotNull default @NotNull String renderToMd()
    • renderToAyaMd

      @NotNull default @NotNull String renderToAyaMd()
    • renderToTeX

      @NotNull default @NotNull String renderToTeX()
    • render

      @NotNull default <Out, Config extends PrinterConfig> Out render(@NotNull @NotNull Printer<Out,Config> printer, @NotNull Config config)
    • debugRender

      @NotNull default @NotNull String debugRender()
      Produce ASCII and infinite-width output
    • commonRender

      @NotNull default @NotNull String commonRender()
      Produce unicode and 80-width output
    • linkDef

      @NotNull static @NotNull Doc linkDef(@NotNull @NotNull Doc doc, @NotNull @NotNull Link id)
    • linkRef

      @NotNull static @NotNull Doc linkRef(@NotNull @NotNull Doc doc, @NotNull @NotNull Link href)
    • linkDef

      @NotNull static @NotNull Doc linkDef(@NotNull @NotNull Doc doc, @NotNull @NotNull Link id, @Nullable @Nullable String hover)
    • linkRef

      @NotNull static @NotNull Doc linkRef(@NotNull @NotNull Doc doc, @NotNull @NotNull Link href, @Nullable @Nullable String hover)
    • hyperLink

      @NotNull static @NotNull Doc hyperLink(@NotNull @NotNull Doc doc, @NotNull @NotNull Link href, @Nullable @Nullable String hover)
    • hyperLink

      @NotNull static @NotNull Doc hyperLink(@NotNull @NotNull String plain, @NotNull @NotNull Link href)
    • image

      @NotNull static @NotNull Doc image(@NotNull @NotNull Doc alt, @NotNull @NotNull Link src)
    • code

      @NotNull static @NotNull Doc code(@NotNull @NotNull String code)
    • code

      @NotNull static @NotNull Doc code(@NotNull @NotNull Doc code)
    • code

      @NotNull static @NotNull Doc code(@NotNull @NotNull String language, @NotNull @NotNull Doc code)
    • codeBlock

      @NotNull static @NotNull Doc codeBlock(@NotNull @NotNull String code)
    • codeBlock

      @NotNull static @NotNull Doc codeBlock(@NotNull @NotNull String language, @NotNull @NotNull Doc code)
    • styled

      @NotNull static @NotNull Doc styled(@NotNull @NotNull Style style, @NotNull @NotNull Doc doc)
    • styled

      @NotNull static @NotNull Doc styled(@NotNull @NotNull Style style, @NotNull @NotNull String plain)
    • styled

      @NotNull static @NotNull Doc styled(@NotNull @NotNull Styles builder, @NotNull @NotNull Doc doc)
    • styled

      @NotNull static @NotNull Doc styled(@NotNull @NotNull Styles builder, @NotNull @NotNull String plain)
    • licit

      @NotNull static @NotNull Doc licit(boolean explicit, Doc doc)
    • spaced

      @NotNull static @NotNull Doc spaced(Doc symbol)
    • wrap

      @NotNull static @NotNull Doc wrap(String leftSymbol, String rightSymbol, Doc doc)
    • bracedUnless

      @NotNull static @NotNull Doc bracedUnless(Doc doc, boolean falsification)
      Parameters:
      falsification - when false, add braces
    • braced

      @NotNull static @NotNull Doc braced(Doc doc)
    • flatAltBracedBlock

      @NotNull static @NotNull Doc flatAltBracedBlock(Doc defaultDoc, Doc flatDoc)
      Either `{ defaultDoc }` or `{\nflatDoc\n}`
    • angled

      @NotNull static @NotNull Doc angled(Doc doc)
    • parened

      @NotNull static @NotNull Doc parened(Doc doc)
    • emptyIf

      @NotNull static @NotNull Doc emptyIf(boolean cond, Supplier<@NotNull Doc> otherwise)
      Return conditional empty()
      Parameters:
      cond - condition
      otherwise - otherwise
      Returns:
      Doc.Empty when cond is true, otherwise otherwise
    • empty

      @NotNull static @NotNull Doc empty()
      The empty document; conceptually the unit of 'Cat'
      Returns:
      empty document
    • flatAlt

      @Contract("_, _ -> new") @NotNull static @NotNull Doc flatAlt(@NotNull @NotNull Doc defaultDoc, @NotNull @NotNull Doc preferWhenFlattened)
      By default, flatAlt renders as . However, when 'group'-ed, will be preferred, with as the fallback for the case when doesn't fit.
      Parameters:
      defaultDoc - default document
      preferWhenFlattened - document selected when flattened
      Returns:
      alternative document
    • column

      @Contract("_ -> new") @NotNull static @NotNull Doc column(@NotNull @NotNull IntFunction<Doc> docBuilder)
      Layout a document depending on which column it starts at. align(Doc) is implemented in terms of column.
      Parameters:
      docBuilder - document generator when current position provided
      Returns:
      column action document
    • nesting

      @Contract("_ -> new") @NotNull static @NotNull Doc nesting(@NotNull @NotNull IntFunction<Doc> docBuilder)
      Layout a document depending on the current 'nest'-ing level. align(Doc) is implemented in terms of nesting.
      Parameters:
      docBuilder - document generator when current nest level provided
      Returns:
      nest level action document
    • pageWidth

      @Contract("_ -> new") @NotNull static @NotNull Doc pageWidth(@NotNull @NotNull IntFunction<Doc> docBuilder)
      Layout a document depending on the page width, if one has been specified.
      Parameters:
      docBuilder - document generator when page width provided
      Returns:
      page width action document
    • nest

      @Contract("_, _ -> new") @NotNull static @NotNull Doc nest(int indent, @NotNull @NotNull Doc doc)
      lays out the document with the current nesting level (indentation of the following lines) increased by . Negative values are allowed, and decrease the nesting level accordingly.

      For differences between hang(int, Doc), indent(int, Doc) and nest(int, Doc), see unit tests in file "DocStringPrinterTest.java".

      Parameters:
      indent - indentation of the following lines
      doc - the document to lay out
      Returns:
      indented document
    • align

      @Contract("_ -> new") @NotNull static @NotNull Doc align(@NotNull @NotNull Doc doc)
      align lays out the document with the nesting level set to the current column. It is used for example to implement hang(int, Doc).

      As an example, we will put a document right above another one, regardless of the current nesting level. Without 'align'-ment, the second line is put simply below everything we've had so far,

      If we add an 'align' to the mix, the @'vsep'@'s contents all start in the same column,

      Parameters:
      doc - document to be aligned
      Returns:
      aligned document
    • hang

      @Contract("_, _ -> new") @NotNull static @NotNull Doc hang(int deltaNest, @NotNull @NotNull Doc doc)
      hang lays out the document with a nesting level set to the /current column/ plus . Negative values are allowed, and decrease the nesting level accordingly.

      This differs from nest(int, Doc), which is based on the /current nesting level/ plus indent. When you're not sure, try the more efficient 'nest' first. In our example, this would yield

      For differences between hang(int, Doc), indent(int, Doc) and nest(int, Doc), see unit tests in file "DocStringPrinterTest.java".

      Parameters:
      deltaNest - change of nesting level, relative to the start of the first line
      doc - document to indent
      Returns:
      hang-ed document
    • indent

      @Contract("_, _ -> new") @NotNull static @NotNull Doc indent(int indent, @NotNull @NotNull Doc doc)
      This method indent document by columns, * starting from the current cursor position.

      This differs from hang(int, Doc), which starts from the next line.

      For differences between hang(int, Doc), indent(int, Doc) and nest(int, Doc), see unit tests in file "DocStringPrinterTest.java".

      Parameters:
      indent - Number of spaces to increase indentation by
      Returns:
      The indented document
    • spaces

      @NotNull static @NotNull Doc spaces(int n)
    • par

      @Contract("_, _ -> new") @NotNull static @NotNull Doc par(int indent, @NotNull @NotNull Doc doc)
      Paragraph indentation: indent by columns, and then indent the first line again by columns. This should be used at the line start.
    • splitR

      @NotNull static @NotNull Doc splitR(int minBeforeDelim, @NotNull @NotNull Doc left, @NotNull @NotNull Doc delim, @NotNull @NotNull Doc right)
      Concat , and , with occupying at least length. The "R" in method name stands for "right", which means the delim is placed near the right.

      This behaves like printf("%-*s%s%s", minBeforeDelim, left, delim, right); For example:

         var doc = split(8, plain("Help"), plain(":"), english("Show the help message"));
         assertEquals("Help    :Show the help message", doc.commonRender());
       
      Parameters:
      minBeforeDelim - The minimum length before
      API Note:
      , , should all be 1-line documents
    • splitL

      @NotNull static @NotNull Doc splitL(int minBeforeRight, @NotNull @NotNull Doc left, @NotNull @NotNull Doc delim, @NotNull @NotNull Doc right)
      Concat , and , with and occupying at least length. The "L" in method name stands for "left", which means the delim is placed near the left.

      This behaves like printf("%*s%s", minBeforeRight, (left ++ delim), right); For example:

         var doc = splitR(8, plain("Help"), plain(":"), english("Show the help message"));
         assertEquals("Help:   Show the help message", doc.commonRender());
       
      Parameters:
      minBeforeRight - The minimum length before
      API Note:
      , , should all be 1-line documents
    • catBlockR

      @NotNull static @NotNull Doc catBlockR(int minBeforeDelim, @NotNull @NotNull kala.collection.SeqLike<Doc> left, @NotNull @NotNull Doc delim, @NotNull @NotNull kala.collection.SeqLike<Doc> right)
    • catBlockL

      @NotNull static @NotNull Doc catBlockL(int minBeforeRight, @NotNull @NotNull kala.collection.SeqLike<Doc> left, @NotNull @NotNull Doc delim, @NotNull @NotNull kala.collection.SeqLike<Doc> right)
    • cblock

      @Contract("_, _, _ -> new") @NotNull static @NotNull Doc cblock(@NotNull @NotNull Doc prefix, int indent, @NotNull @NotNull Doc block)
      Creates a C-style indented block of statements.
         prefix {
         [indent]block
         }
       
    • ordinal

      @Contract("_ -> new") @NotNull static @NotNull Doc ordinal(int n)
    • plain

      @Contract("_ -> new") @NotNull static @NotNull Doc plain(String text)
      Plain text document. Backend will escape the text if it contains offending characters.
      Parameters:
      text - text that may not contain '\n'
      Returns:
      text document of the whole text
    • escaped

      @Contract("_ -> new") @NotNull static @NotNull Doc escaped(String text)
      Already escaped text that will be rendered as-is. Callers should be responsible for escaping offending characters (like '\n', 'invalid input: '<'', etc.) depending on the backend. Use with care as this may result in invalid output format.

      Note that this is not the same as code(java.lang.String) or codeBlock(java.lang.String). Although in most cases code segments are treated as "already escaped" text that will be rendered as-is. But for HTML, code segments is still escaped because they are placed in `` and `

      `.
      Parameters:
      text - text that will be rendered as-is.
    • english

      @Contract("_ -> new") @NotNull static @NotNull Doc english(String text)
    • symbol

      @Contract("_ -> new") @NotNull static @NotNull Doc symbol(String text)
      Parameters:
      text - '\n' not allowed!
      Returns:
      special symbol
    • cat

      @Contract("_ -> new") @NotNull static @NotNull Doc cat(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
      cat tries laying out the documents separated with nothing, and if this does not fit the page, separates them with newlines. This is what differentiates it from 'vcat', which always lays out its contents beneath each other.
      Parameters:
      docs - documents to concat
      Returns:
      cat document
    • cat

      @Contract("_ -> new") @NotNull static @NotNull Doc cat(Doc @NotNull ... docs)
      See Also:
    • vcat

      @Contract("_ -> new") @NotNull static @NotNull Doc vcat(Doc @NotNull ... docs)
    • vcat

      @Contract("_ -> new") @NotNull static @NotNull Doc vcat(@NotNull @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
    • vcatNonEmpty

      @Contract("_ -> new") @NotNull static @NotNull Doc vcatNonEmpty(Doc @NotNull ... docs)
    • vcatNonEmpty

      @Contract("_ -> new") @NotNull static @NotNull Doc vcatNonEmpty(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
    • list

      @Contract("_, _ -> new") @NotNull static @NotNull Doc list(boolean isOrdered, @NotNull @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
    • ordered

      @Contract("_ -> new") @NotNull static @NotNull Doc ordered(Doc @NotNull ... docs)
    • bullet

      @Contract("_ -> new") @NotNull static @NotNull Doc bullet(Doc @NotNull ... docs)
    • stickySep

      @Contract("_ -> new") @NotNull static @NotNull Doc stickySep(@NotNull @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
      stickySep concatenates all documents horizontally with a space, i.e. it puts a space between all entries.

      stickySep does not introduce line breaks on its own, even when the page is too narrow:

      Parameters:
      docs - documents to separate
      Returns:
      separated documents
    • stickySep

      @Contract("_ -> new") @NotNull static @NotNull Doc stickySep(Doc @NotNull ... docs)
    • sep

      @Contract("_ -> new") @NotNull static @NotNull Doc sep(Doc @NotNull ... docs)
      fillSep concatenates the documents horizontally with a space as long as it fits the page, then inserts a 'line' and continues doing that for all documents in . 'line' means that if 'group'-ed, the documents are separated with a 'space' instead of newlines. Use cat(kala.collection.SeqLike<org.aya.pretty.doc.Doc>) if you do not want a 'space'.

      Let's print some words to fill the line:

      Parameters:
      docs - documents to separate
      Returns:
      separated documents
    • sep

      @Contract("_ -> new") @NotNull static @NotNull Doc sep(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
    • sepNonEmpty

      @Contract("_ -> new") @NotNull static @NotNull Doc sepNonEmpty(Doc @NotNull ... docs)
    • sepNonEmpty

      @Contract("_ -> new") @NotNull static @NotNull Doc sepNonEmpty(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
    • commaList

      @Contract("_ -> new") @NotNull static @NotNull Doc commaList(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
    • vcommaList

      @Contract("_ -> new") @NotNull static @NotNull Doc vcommaList(@NotNull @NotNull kala.collection.SeqLike<Doc> docs)
    • join

      @Contract("_, _ -> new") @NotNull static @NotNull Doc join(@NotNull @NotNull Doc delim, Doc @NotNull ... docs)
    • join

      @Contract("_, _ -> new") @NotNull static @NotNull Doc join(@NotNull @NotNull Doc delim, @NotNull @NotNull kala.collection.SeqLike<@NotNull Doc> docs)
    • line

      @Contract("-> new") @NotNull static @NotNull Doc line()
      Unconditionally line break
      Returns:
      hard line document