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