java.lang.Object
java.lang.Enum<CloseOp>
com.google.googlejavaformat.CloseOp
All Implemented Interfaces:
Op, Serializable, Comparable<CloseOp>, java.lang.constant.Constable

public enum CloseOp extends Enum<CloseOp> implements Op
A CloseOp closes a level. It is an Op in the sequence of Ops generated by OpsBuilder. When the sequence is turned into a Doc by DocBuilder, ranges delimited by OpenOp-CloseOp pairs turn into nested Doc.Levels.
  • Enum Constant Details

    • CLOSE

      public static final CloseOp CLOSE
  • Method Details

    • values

      public static CloseOp[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CloseOp valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • make

      public static Op make()
      Make a CloseOp, returning a singleton since they are all the same.
      Returns:
      the singleton CloseOp
    • 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 String toString()
      Overrides:
      toString in class Enum<CloseOp>