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

dev.cel.common.internal.AutoValue_ProtoEquality_ProtoMap Maven / Gradle / Ivy

The newest version!
package dev.cel.common.internal;

import com.google.common.collect.ImmutableMap;
import com.google.protobuf.Descriptors;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ProtoEquality_ProtoMap extends ProtoEquality.ProtoMap {

  private final Descriptors.FieldDescriptor valueField;

  private final ImmutableMap map;

  AutoValue_ProtoEquality_ProtoMap(
      Descriptors.FieldDescriptor valueField,
      ImmutableMap map) {
    if (valueField == null) {
      throw new NullPointerException("Null valueField");
    }
    this.valueField = valueField;
    if (map == null) {
      throw new NullPointerException("Null map");
    }
    this.map = map;
  }

  @Override
  Descriptors.FieldDescriptor valueField() {
    return valueField;
  }

  @Override
  ImmutableMap map() {
    return map;
  }

  @Override
  public String toString() {
    return "ProtoMap{"
        + "valueField=" + valueField + ", "
        + "map=" + map
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ProtoEquality.ProtoMap) {
      ProtoEquality.ProtoMap that = (ProtoEquality.ProtoMap) o;
      return this.valueField.equals(that.valueField())
          && this.map.equals(that.map());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= valueField.hashCode();
    h$ *= 1000003;
    h$ ^= map.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy