com.google.common.truth.extensions.proto.AutoValue_UnknownFieldDescriptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truth-proto-extension Show documentation
Show all versions of truth-proto-extension Show documentation
An extension for the Truth test assertion framework supporting
Protocol Buffers.
The newest version!
package com.google.common.truth.extensions.proto;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_UnknownFieldDescriptor extends UnknownFieldDescriptor {
private final int fieldNumber;
private final UnknownFieldDescriptor.Type type;
AutoValue_UnknownFieldDescriptor(
int fieldNumber,
UnknownFieldDescriptor.Type type) {
this.fieldNumber = fieldNumber;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
}
@Override
int fieldNumber() {
return fieldNumber;
}
@Override
UnknownFieldDescriptor.Type type() {
return type;
}
@Override
public String toString() {
return "UnknownFieldDescriptor{"
+ "fieldNumber=" + fieldNumber + ", "
+ "type=" + type
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof UnknownFieldDescriptor) {
UnknownFieldDescriptor that = (UnknownFieldDescriptor) o;
return this.fieldNumber == that.fieldNumber()
&& this.type.equals(that.type());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= fieldNumber;
h$ *= 1000003;
h$ ^= type.hashCode();
return h$;
}
}