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

com.google.gerrit.httpd.AutoValue_AdvertisedObjectsCacheKey Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc4
Show newest version


package com.google.gerrit.httpd;

import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Project;
import javax.annotation.Generated;

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

  private final Account.Id account;

  private final Project.NameKey project;

  AutoValue_AdvertisedObjectsCacheKey(
      Account.Id account,
      Project.NameKey project) {
    if (account == null) {
      throw new NullPointerException("Null account");
    }
    this.account = account;
    if (project == null) {
      throw new NullPointerException("Null project");
    }
    this.project = project;
  }

  @Override
  public Account.Id account() {
    return account;
  }

  @Override
  public Project.NameKey project() {
    return project;
  }

  @Override
  public String toString() {
    return "AdvertisedObjectsCacheKey{"
         + "account=" + account + ", "
         + "project=" + project
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AdvertisedObjectsCacheKey) {
      AdvertisedObjectsCacheKey that = (AdvertisedObjectsCacheKey) o;
      return (this.account.equals(that.account()))
           && (this.project.equals(that.project()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy