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

com.google.gerrit.server.notedb.AutoValue_ChangeNotesCache_Key Maven / Gradle / Ivy

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

import com.google.gerrit.entities.Change;
import com.google.gerrit.entities.Project;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeNotesCache_Key extends ChangeNotesCache.Key {

  private final Project.NameKey project;

  private final Change.Id changeId;

  private final ObjectId id;

  AutoValue_ChangeNotesCache_Key(
      Project.NameKey project,
      Change.Id changeId,
      ObjectId id) {
    if (project == null) {
      throw new NullPointerException("Null project");
    }
    this.project = project;
    if (changeId == null) {
      throw new NullPointerException("Null changeId");
    }
    this.changeId = changeId;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
  }

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

  @Override
  Change.Id changeId() {
    return changeId;
  }

  @Override
  ObjectId id() {
    return id;
  }

  @Override
  public String toString() {
    return "Key{"
        + "project=" + project + ", "
        + "changeId=" + changeId + ", "
        + "id=" + id
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ChangeNotesCache.Key) {
      ChangeNotesCache.Key that = (ChangeNotesCache.Key) o;
      return this.project.equals(that.project())
          && this.changeId.equals(that.changeId())
          && this.id.equals(that.id());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy