Class OpenOp

  • All Implemented Interfaces:
    Op

    public final class OpenOp
    extends java.lang.Object
    implements Op
    An OpenOp opens a level. It is an Op in the sequence of Ops generated by OpsBuilder. When the sequence is turned into a Doc by DocBuilder, Input.Toks delimited by OpenOp-CloseOp pairs turn into nested Doc.Levels.
    • Field Detail

      • plusIndent

        private final Indent plusIndent
    • Constructor Detail

      • OpenOp

        private OpenOp​(Indent plusIndent)
    • Method Detail

      • make

        public static Op make​(Indent plusIndent)
        Make an ordinary OpenOp.
        Parameters:
        plusIndent - the indent for breaks at this level
        Returns:
        the OpenOp
      • add

        public void add​(DocBuilder builder)
        Description copied from interface: Op
        Add an Op to a DocBuilder.
        Specified by:
        add in interface Op
        Parameters:
        builder - the DocBuilder
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object