Class Replacements
java.lang.Object
com.google.errorprone.fixes.Replacements
A collection of
Replacement
s to be made to a source file.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A policy for handling overlapping insertions. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(Replacement replacement) add
(Replacement replacement, Replacements.CoalescePolicy coalescePolicy) com.google.common.collect.ImmutableSet
<Replacement> Non-overlapping replacements, sorted in ascending order by position.Deprecated.boolean
isEmpty()
-
Constructor Details
-
Replacements
public Replacements()
-
-
Method Details
-
add
-
add
@CanIgnoreReturnValue public Replacements add(Replacement replacement, Replacements.CoalescePolicy coalescePolicy) -
descending
Deprecated.Non-overlapping replacements, sorted in descending order by position. Prefer usingascending()
when applying changes, because applying changes in reverse tends to result in quadratic-time copying of the underlying string. -
ascending
Non-overlapping replacements, sorted in ascending order by position. -
isEmpty
public boolean isEmpty()
-