com.google.gerrit.server.patch.AutoValue_GitPositionTransformer_FileMapping Maven / Gradle / Ivy
The newest version!
package com.google.gerrit.server.patch;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_GitPositionTransformer_FileMapping extends GitPositionTransformer.FileMapping {
private final Optional oldPath;
private final Optional newPath;
AutoValue_GitPositionTransformer_FileMapping(
Optional oldPath,
Optional newPath) {
if (oldPath == null) {
throw new NullPointerException("Null oldPath");
}
this.oldPath = oldPath;
if (newPath == null) {
throw new NullPointerException("Null newPath");
}
this.newPath = newPath;
}
@Override
public Optional oldPath() {
return oldPath;
}
@Override
public Optional newPath() {
return newPath;
}
@Override
public String toString() {
return "FileMapping{"
+ "oldPath=" + oldPath + ", "
+ "newPath=" + newPath
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof GitPositionTransformer.FileMapping) {
GitPositionTransformer.FileMapping that = (GitPositionTransformer.FileMapping) o;
return this.oldPath.equals(that.oldPath())
&& this.newPath.equals(that.newPath());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= oldPath.hashCode();
h$ *= 1000003;
h$ ^= newPath.hashCode();
return h$;
}
}