com.google.gerrit.server.submit.AutoValue_LocalMergeSuperSetComputation_QueryKey Maven / Gradle / Ivy
package com.google.gerrit.server.submit;
import com.google.common.collect.ImmutableSet;
import com.google.gerrit.entities.BranchNameKey;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LocalMergeSuperSetComputation_QueryKey extends LocalMergeSuperSetComputation.QueryKey {
private final BranchNameKey branch;
private final ImmutableSet hashes;
AutoValue_LocalMergeSuperSetComputation_QueryKey(
BranchNameKey branch,
ImmutableSet hashes) {
if (branch == null) {
throw new NullPointerException("Null branch");
}
this.branch = branch;
if (hashes == null) {
throw new NullPointerException("Null hashes");
}
this.hashes = hashes;
}
@Override
BranchNameKey branch() {
return branch;
}
@Override
ImmutableSet hashes() {
return hashes;
}
@Override
public String toString() {
return "QueryKey{"
+ "branch=" + branch + ", "
+ "hashes=" + hashes
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LocalMergeSuperSetComputation.QueryKey) {
LocalMergeSuperSetComputation.QueryKey that = (LocalMergeSuperSetComputation.QueryKey) o;
return this.branch.equals(that.branch())
&& this.hashes.equals(that.hashes());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= branch.hashCode();
h$ *= 1000003;
h$ ^= hashes.hashCode();
return h$;
}
}