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

com.google.gerrit.acceptance.AutoValue_TestMetricMaker_CounterKey Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc4
Show newest version
package com.google.gerrit.acceptance;

import com.google.common.collect.ImmutableList;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_TestMetricMaker_CounterKey extends TestMetricMaker.CounterKey {

  private final String name;

  private final ImmutableList fieldValues;

  AutoValue_TestMetricMaker_CounterKey(
      String name,
      ImmutableList fieldValues) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (fieldValues == null) {
      throw new NullPointerException("Null fieldValues");
    }
    this.fieldValues = fieldValues;
  }

  @Override
  String name() {
    return name;
  }

  @Override
  ImmutableList fieldValues() {
    return fieldValues;
  }

  @Override
  public String toString() {
    return "CounterKey{"
        + "name=" + name + ", "
        + "fieldValues=" + fieldValues
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TestMetricMaker.CounterKey) {
      TestMetricMaker.CounterKey that = (TestMetricMaker.CounterKey) o;
      return this.name.equals(that.name())
          && this.fieldValues.equals(that.fieldValues());
    }
    return false;
  }

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

}