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

com.google.gerrit.server.project.AutoValue_ProjectRef Maven / Gradle / Ivy

There is a newer version: 3.11.0
Show newest version

package com.google.gerrit.server.project;

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

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

  private final Project.NameKey project;
  private final String ref;

  AutoValue_ProjectRef(
      Project.NameKey project,
      String ref) {
    if (project == null) {
      throw new NullPointerException("Null project");
    }
    this.project = project;
    if (ref == null) {
      throw new NullPointerException("Null ref");
    }
    this.ref = ref;
  }

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

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

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

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

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy