类 Level


public final class Level extends Doc
A Level inside a Doc.
  • 方法详细资料

    • computeWidth

      protected float computeWidth()
      从类复制的说明: Doc
      Compute the Doc's width.
      指定者:
      computeWidth 在类中 Doc
      返回:
      the width, or Float.POSITIVE_INFINITY if it must be broken
    • computeFlat

      protected String computeFlat()
      从类复制的说明: Doc
      Compute the Doc's flat value. Not defined (and never called) if contains forced breaks.
      指定者:
      computeFlat 在类中 Doc
      返回:
      the flat value
    • computeRange

      protected com.google.common.collect.Range<Integer> computeRange()
      从类复制的说明: Doc
      Compute the Doc's Range of Input.Tokens.
      指定者:
      computeRange 在类中 Doc
      返回:
      the Range
    • computeBreaks

      public State computeBreaks(CommentsHelper commentsHelper, int maxWidth, State state, Obs.ExplorationNode observer)
      从类复制的说明: Doc
      Make breaking decisions for a Doc.
      指定者:
      computeBreaks 在类中 Doc
      参数:
      maxWidth - the maximum line width
      state - the current output state
      返回:
      the new output state
    • write

      public void write(State state, Output output)
      从类复制的说明: Doc
      Write a Doc to an Output, after breaking decisions have been made.
      指定者:
      write 在类中 Doc
    • getPlusIndent

      public Indent getPlusIndent()
    • partialInlineability

      public PartialInlineability partialInlineability()
    • getDebugName

      public Optional<String> getDebugName()
    • getOpenOp

      public OpenOp getOpenOp()
    • getColumnLimitBeforeLastBreak

      public OptionalInt getColumnLimitBeforeLastBreak()
      An optional, more restrictive column limit for inner breaks that are marked as Break.hasColumnLimit(). If the level is to be considered one-lineable, the last such break must not start at a column higher than this.
    • representation

      public String representation(State state)
      An indented representation of this level and all nested levels inside it.
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object