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

com.google.gerrit.httpd.plugins.AutoValue_PluginResourceKey Maven / Gradle / Ivy

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


package com.google.gerrit.httpd.plugins;

import com.google.gerrit.server.plugins.Plugin;
import javax.annotation.Generated;

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

  private final Plugin.CacheKey plugin;

  private final String resource;

  AutoValue_PluginResourceKey(
      Plugin.CacheKey plugin,
      String resource) {
    if (plugin == null) {
      throw new NullPointerException("Null plugin");
    }
    this.plugin = plugin;
    if (resource == null) {
      throw new NullPointerException("Null resource");
    }
    this.resource = resource;
  }

  @Override
  public Plugin.CacheKey plugin() {
    return plugin;
  }

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

  @Override
  public String toString() {
    return "PluginResourceKey{"
         + "plugin=" + plugin + ", "
         + "resource=" + resource
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PluginResourceKey) {
      PluginResourceKey that = (PluginResourceKey) o;
      return (this.plugin.equals(that.plugin()))
           && (this.resource.equals(that.resource()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy