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

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

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

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

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

  private final ObjectId commitId;

  private final Comment.Key key;

  AutoValue_ChangeDraftUpdate_Key(
      ObjectId commitId,
      Comment.Key key) {
    if (commitId == null) {
      throw new NullPointerException("Null commitId");
    }
    this.commitId = commitId;
    if (key == null) {
      throw new NullPointerException("Null key");
    }
    this.key = key;
  }

  @Override
  ObjectId commitId() {
    return commitId;
  }

  @Override
  Comment.Key key() {
    return key;
  }

  @Override
  public String toString() {
    return "Key{"
        + "commitId=" + commitId + ", "
        + "key=" + key
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ChangeDraftUpdate.Key) {
      ChangeDraftUpdate.Key that = (ChangeDraftUpdate.Key) o;
      return this.commitId.equals(that.commitId())
          && this.key.equals(that.key());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy