com.google.gerrit.server.notedb.AutoValue_ChangeNoteUtil_CommitMessageRange Maven / Gradle / Ivy
package com.google.gerrit.server.notedb;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeNoteUtil_CommitMessageRange extends ChangeNoteUtil.CommitMessageRange {
private final int subjectStart;
private final int subjectEnd;
private final int changeMessageStart;
private final int changeMessageEnd;
private AutoValue_ChangeNoteUtil_CommitMessageRange(
int subjectStart,
int subjectEnd,
int changeMessageStart,
int changeMessageEnd) {
this.subjectStart = subjectStart;
this.subjectEnd = subjectEnd;
this.changeMessageStart = changeMessageStart;
this.changeMessageEnd = changeMessageEnd;
}
@Override
public int subjectStart() {
return subjectStart;
}
@Override
public int subjectEnd() {
return subjectEnd;
}
@Override
public int changeMessageStart() {
return changeMessageStart;
}
@Override
public int changeMessageEnd() {
return changeMessageEnd;
}
@Override
public String toString() {
return "CommitMessageRange{"
+ "subjectStart=" + subjectStart + ", "
+ "subjectEnd=" + subjectEnd + ", "
+ "changeMessageStart=" + changeMessageStart + ", "
+ "changeMessageEnd=" + changeMessageEnd
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ChangeNoteUtil.CommitMessageRange) {
ChangeNoteUtil.CommitMessageRange that = (ChangeNoteUtil.CommitMessageRange) o;
return this.subjectStart == that.subjectStart()
&& this.subjectEnd == that.subjectEnd()
&& this.changeMessageStart == that.changeMessageStart()
&& this.changeMessageEnd == that.changeMessageEnd();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= subjectStart;
h$ *= 1000003;
h$ ^= subjectEnd;
h$ *= 1000003;
h$ ^= changeMessageStart;
h$ *= 1000003;
h$ ^= changeMessageEnd;
return h$;
}
static final class Builder extends ChangeNoteUtil.CommitMessageRange.Builder {
private Integer subjectStart;
private Integer subjectEnd;
private Integer changeMessageStart;
private Integer changeMessageEnd;
Builder() {
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder subjectStart(int subjectStart) {
this.subjectStart = subjectStart;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder subjectEnd(int subjectEnd) {
this.subjectEnd = subjectEnd;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder changeMessageStart(int changeMessageStart) {
this.changeMessageStart = changeMessageStart;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder changeMessageEnd(int changeMessageEnd) {
this.changeMessageEnd = changeMessageEnd;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange build() {
String missing = "";
if (this.subjectStart == null) {
missing += " subjectStart";
}
if (this.subjectEnd == null) {
missing += " subjectEnd";
}
if (this.changeMessageStart == null) {
missing += " changeMessageStart";
}
if (this.changeMessageEnd == null) {
missing += " changeMessageEnd";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ChangeNoteUtil_CommitMessageRange(
this.subjectStart,
this.subjectEnd,
this.changeMessageStart,
this.changeMessageEnd);
}
}
}