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

com.google.gerrit.server.account.AutoValue_CachedAccountDetails Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc6
Show newest version
package com.google.gerrit.server.account;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.gerrit.entities.Account;
import com.google.gerrit.entities.NotifyConfig;
import com.google.gerrit.server.config.CachedPreferences;
import javax.annotation.processing.Generated;

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

  private final Account account;

  private final ImmutableMap> projectWatches;

  private final CachedPreferences preferences;

  AutoValue_CachedAccountDetails(
      Account account,
      ImmutableMap> projectWatches,
      CachedPreferences preferences) {
    if (account == null) {
      throw new NullPointerException("Null account");
    }
    this.account = account;
    if (projectWatches == null) {
      throw new NullPointerException("Null projectWatches");
    }
    this.projectWatches = projectWatches;
    if (preferences == null) {
      throw new NullPointerException("Null preferences");
    }
    this.preferences = preferences;
  }

  @Override
  Account account() {
    return account;
  }

  @Override
  ImmutableMap> projectWatches() {
    return projectWatches;
  }

  @Override
  CachedPreferences preferences() {
    return preferences;
  }

  @Override
  public String toString() {
    return "CachedAccountDetails{"
        + "account=" + account + ", "
        + "projectWatches=" + projectWatches + ", "
        + "preferences=" + preferences
        + "}";
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy