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

com.google.gerrit.server.config.AutoValue_ConfigKey Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.server.config;

import com.google.gerrit.common.Nullable;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ConfigKey extends ConfigKey {

  private final String section;

  @Nullable
  private final String subsection;

  private final String name;

  AutoValue_ConfigKey(
      String section,
      @Nullable String subsection,
      String name) {
    if (section == null) {
      throw new NullPointerException("Null section");
    }
    this.section = section;
    this.subsection = subsection;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
  }

  @Override
  public String section() {
    return section;
  }

  @Nullable
  @Override
  public String subsection() {
    return subsection;
  }

  @Override
  public String name() {
    return name;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ConfigKey) {
      ConfigKey that = (ConfigKey) o;
      return this.section.equals(that.section())
          && (this.subsection == null ? that.subsection() == null : this.subsection.equals(that.subsection()))
          && this.name.equals(that.name());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= section.hashCode();
    h$ *= 1000003;
    h$ ^= (subsection == null) ? 0 : subsection.hashCode();
    h$ *= 1000003;
    h$ ^= name.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy