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

com.google.gerrit.server.patch.filediff.AutoValue_GitDiffEntity Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.server.patch.filediff;

import com.google.gerrit.server.patch.gitfilediff.GitFileDiff;
import com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheKey;
import javax.annotation.processing.Generated;

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

  private final GitFileDiffCacheKey gitKey;

  private final GitFileDiff gitDiff;

  AutoValue_GitDiffEntity(
      GitFileDiffCacheKey gitKey,
      GitFileDiff gitDiff) {
    if (gitKey == null) {
      throw new NullPointerException("Null gitKey");
    }
    this.gitKey = gitKey;
    if (gitDiff == null) {
      throw new NullPointerException("Null gitDiff");
    }
    this.gitDiff = gitDiff;
  }

  @Override
  GitFileDiffCacheKey gitKey() {
    return gitKey;
  }

  @Override
  GitFileDiff gitDiff() {
    return gitDiff;
  }

  @Override
  public String toString() {
    return "GitDiffEntity{"
        + "gitKey=" + gitKey + ", "
        + "gitDiff=" + gitDiff
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof GitDiffEntity) {
      GitDiffEntity that = (GitDiffEntity) o;
      return this.gitKey.equals(that.gitKey())
          && this.gitDiff.equals(that.gitDiff());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy