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 int subjectStart;
private int subjectEnd;
private int changeMessageStart;
private int changeMessageEnd;
private byte set$0;
Builder() {
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder subjectStart(int subjectStart) {
this.subjectStart = subjectStart;
set$0 |= (byte) 1;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder subjectEnd(int subjectEnd) {
this.subjectEnd = subjectEnd;
set$0 |= (byte) 2;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder changeMessageStart(int changeMessageStart) {
this.changeMessageStart = changeMessageStart;
set$0 |= (byte) 4;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange.Builder changeMessageEnd(int changeMessageEnd) {
this.changeMessageEnd = changeMessageEnd;
set$0 |= (byte) 8;
return this;
}
@Override
ChangeNoteUtil.CommitMessageRange build() {
if (set$0 != 0xf) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" subjectStart");
}
if ((set$0 & 2) == 0) {
missing.append(" subjectEnd");
}
if ((set$0 & 4) == 0) {
missing.append(" changeMessageStart");
}
if ((set$0 & 8) == 0) {
missing.append(" changeMessageEnd");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ChangeNoteUtil_CommitMessageRange(
this.subjectStart,
this.subjectEnd,
this.changeMessageStart,
this.changeMessageEnd);
}
}
}