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

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

The 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_ChangeDraftNotesUpdate_Key extends ChangeDraftNotesUpdate.Key {

  private final ObjectId commitId;

  private final Comment.Key key;

  AutoValue_ChangeDraftNotesUpdate_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 ChangeDraftNotesUpdate.Key) {
      ChangeDraftNotesUpdate.Key that = (ChangeDraftNotesUpdate.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