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

com.google.gerrit.server.patch.gitfilediff.AutoValue_GitFileDiffCacheImpl_DiffOptions Maven / Gradle / Ivy

There is a newer version: 3.10.1
Show newest version
package com.google.gerrit.server.patch.gitfilediff;

import com.google.gerrit.extensions.client.DiffPreferencesInfo;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_GitFileDiffCacheImpl_DiffOptions extends GitFileDiffCacheImpl.DiffOptions {

  private final ObjectId oldTree;

  private final ObjectId newTree;

  private final Integer renameScore;

  private final DiffPreferencesInfo.Whitespace whitespace;

  private final GitFileDiffCacheImpl.DiffAlgorithm diffAlgorithm;

  AutoValue_GitFileDiffCacheImpl_DiffOptions(
      ObjectId oldTree,
      ObjectId newTree,
      Integer renameScore,
      DiffPreferencesInfo.Whitespace whitespace,
      GitFileDiffCacheImpl.DiffAlgorithm diffAlgorithm) {
    if (oldTree == null) {
      throw new NullPointerException("Null oldTree");
    }
    this.oldTree = oldTree;
    if (newTree == null) {
      throw new NullPointerException("Null newTree");
    }
    this.newTree = newTree;
    if (renameScore == null) {
      throw new NullPointerException("Null renameScore");
    }
    this.renameScore = renameScore;
    if (whitespace == null) {
      throw new NullPointerException("Null whitespace");
    }
    this.whitespace = whitespace;
    if (diffAlgorithm == null) {
      throw new NullPointerException("Null diffAlgorithm");
    }
    this.diffAlgorithm = diffAlgorithm;
  }

  @Override
  ObjectId oldTree() {
    return oldTree;
  }

  @Override
  ObjectId newTree() {
    return newTree;
  }

  @Override
  Integer renameScore() {
    return renameScore;
  }

  @Override
  DiffPreferencesInfo.Whitespace whitespace() {
    return whitespace;
  }

  @Override
  GitFileDiffCacheImpl.DiffAlgorithm diffAlgorithm() {
    return diffAlgorithm;
  }

  @Override
  public String toString() {
    return "DiffOptions{"
        + "oldTree=" + oldTree + ", "
        + "newTree=" + newTree + ", "
        + "renameScore=" + renameScore + ", "
        + "whitespace=" + whitespace + ", "
        + "diffAlgorithm=" + diffAlgorithm
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof GitFileDiffCacheImpl.DiffOptions) {
      GitFileDiffCacheImpl.DiffOptions that = (GitFileDiffCacheImpl.DiffOptions) o;
      return this.oldTree.equals(that.oldTree())
          && this.newTree.equals(that.newTree())
          && this.renameScore.equals(that.renameScore())
          && this.whitespace.equals(that.whitespace())
          && this.diffAlgorithm.equals(that.diffAlgorithm());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= oldTree.hashCode();
    h$ *= 1000003;
    h$ ^= newTree.hashCode();
    h$ *= 1000003;
    h$ ^= renameScore.hashCode();
    h$ *= 1000003;
    h$ ^= whitespace.hashCode();
    h$ *= 1000003;
    h$ ^= diffAlgorithm.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy