Package com.google.googlejavaformat.java
Class Replacement
- java.lang.Object
-
- com.google.googlejavaformat.java.Replacement
-
public final class Replacement extends java.lang.ObjectRepresents a range in the original source and replacement text for that range.google-java-format doesn't depend on AutoValue, to allow AutoValue to depend on google-java-format.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringreplacementStringprivate com.google.common.collect.Range<java.lang.Integer>replaceRange
-
Constructor Summary
Constructors Modifier Constructor Description privateReplacement(com.google.common.collect.Range<java.lang.Integer> replaceRange, java.lang.String replacementString)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Replacementcreate(int startPosition, int endPosition, java.lang.String replaceWith)booleanequals(java.lang.Object o)java.lang.StringgetReplacementString()The string to replace the range of characters with.com.google.common.collect.Range<java.lang.Integer>getReplaceRange()The range of characters in the original source to replace.inthashCode()
-
-
-
Method Detail
-
create
public static Replacement create(int startPosition, int endPosition, java.lang.String replaceWith)
-
getReplaceRange
public com.google.common.collect.Range<java.lang.Integer> getReplaceRange()
The range of characters in the original source to replace.
-
getReplacementString
public java.lang.String getReplacementString()
The string to replace the range of characters with.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-