All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.common.truth.extensions.proto.AutoValue_UnknownFieldDescriptor Maven / Gradle / Ivy

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$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy