com.google.gerrit.server.git.AutoValue_InsertedObject Maven / Gradle / Ivy
package com.google.gerrit.server.git;
import com.google.protobuf.ByteString;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_InsertedObject extends InsertedObject {
private final ObjectId id;
private final int type;
private final ByteString data;
AutoValue_InsertedObject(
ObjectId id,
int type,
ByteString data) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
this.type = type;
if (data == null) {
throw new NullPointerException("Null data");
}
this.data = data;
}
@Override
public ObjectId id() {
return id;
}
@Override
public int type() {
return type;
}
@Override
public ByteString data() {
return data;
}
@Override
public String toString() {
return "InsertedObject{"
+ "id=" + id + ", "
+ "type=" + type + ", "
+ "data=" + data
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof InsertedObject) {
InsertedObject that = (InsertedObject) o;
return this.id.equals(that.id())
&& this.type == that.type()
&& this.data.equals(that.data());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= type;
h$ *= 1000003;
h$ ^= data.hashCode();
return h$;
}
}