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

com.google.gerrit.server.diff.AutoValue_DiffSide Maven / Gradle / Ivy

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

import com.google.gerrit.common.data.PatchScript;
import javax.annotation.processing.Generated;

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

  private final PatchScript.PatchScriptFileInfo fileInfo;

  private final String fileName;

  private final DiffSide.Type type;

  AutoValue_DiffSide(
      PatchScript.PatchScriptFileInfo fileInfo,
      String fileName,
      DiffSide.Type type) {
    if (fileInfo == null) {
      throw new NullPointerException("Null fileInfo");
    }
    this.fileInfo = fileInfo;
    if (fileName == null) {
      throw new NullPointerException("Null fileName");
    }
    this.fileName = fileName;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
  }

  @Override
  public PatchScript.PatchScriptFileInfo fileInfo() {
    return fileInfo;
  }

  @Override
  public String fileName() {
    return fileName;
  }

  @Override
  public DiffSide.Type type() {
    return type;
  }

  @Override
  public String toString() {
    return "DiffSide{"
        + "fileInfo=" + fileInfo + ", "
        + "fileName=" + fileName + ", "
        + "type=" + type
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DiffSide) {
      DiffSide that = (DiffSide) o;
      return this.fileInfo.equals(that.fileInfo())
          && this.fileName.equals(that.fileName())
          && this.type.equals(that.type());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= fileInfo.hashCode();
    h$ *= 1000003;
    h$ ^= fileName.hashCode();
    h$ *= 1000003;
    h$ ^= type.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy