Enum Replacements.CoalescePolicy

java.lang.Object
java.lang.Enum<Replacements.CoalescePolicy>
com.google.errorprone.fixes.Replacements.CoalescePolicy
All Implemented Interfaces:
Serializable, Comparable<Replacements.CoalescePolicy>, java.lang.constant.Constable
Enclosing class:
Replacements

public static enum Replacements.CoalescePolicy
extends Enum<Replacements.CoalescePolicy>
A policy for handling overlapping insertions.
  • Enum Constant Details

  • Method Details

    • values

      public static Replacements.CoalescePolicy[] 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 Replacements.CoalescePolicy 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
    • coalesce

      public abstract String coalesce​(String replacement, String existing)
      Handle an overlapping insert.
      Parameters:
      replacement - the replacement being added.
      existing - the existing insert at this range.
      Returns:
      the coalesced replacement.