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

com.google.gerrit.server.patch.AutoValue_EditTransformer_ContextAwareEdit Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc4
Show newest version


package com.google.gerrit.server.patch;

import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EditTransformer_ContextAwareEdit extends EditTransformer.ContextAwareEdit {

  private final String oldFilePath;

  private final String newFilePath;

  private final int beginA;

  private final int endA;

  private final int beginB;

  private final int endB;

  private final boolean implicitRename;

  AutoValue_EditTransformer_ContextAwareEdit(
      String oldFilePath,
      String newFilePath,
      int beginA,
      int endA,
      int beginB,
      int endB,
      boolean implicitRename) {
    if (oldFilePath == null) {
      throw new NullPointerException("Null oldFilePath");
    }
    this.oldFilePath = oldFilePath;
    if (newFilePath == null) {
      throw new NullPointerException("Null newFilePath");
    }
    this.newFilePath = newFilePath;
    this.beginA = beginA;
    this.endA = endA;
    this.beginB = beginB;
    this.endB = endB;
    this.implicitRename = implicitRename;
  }

  @Override
  public String getOldFilePath() {
    return oldFilePath;
  }

  @Override
  public String getNewFilePath() {
    return newFilePath;
  }

  @Override
  public int getBeginA() {
    return beginA;
  }

  @Override
  public int getEndA() {
    return endA;
  }

  @Override
  public int getBeginB() {
    return beginB;
  }

  @Override
  public int getEndB() {
    return endB;
  }

  @Override
  public boolean isImplicitRename() {
    return implicitRename;
  }

  @Override
  public String toString() {
    return "ContextAwareEdit{"
         + "oldFilePath=" + oldFilePath + ", "
         + "newFilePath=" + newFilePath + ", "
         + "beginA=" + beginA + ", "
         + "endA=" + endA + ", "
         + "beginB=" + beginB + ", "
         + "endB=" + endB + ", "
         + "implicitRename=" + implicitRename
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EditTransformer.ContextAwareEdit) {
      EditTransformer.ContextAwareEdit that = (EditTransformer.ContextAwareEdit) o;
      return (this.oldFilePath.equals(that.getOldFilePath()))
           && (this.newFilePath.equals(that.getNewFilePath()))
           && (this.beginA == that.getBeginA())
           && (this.endA == that.getEndA())
           && (this.beginB == that.getBeginB())
           && (this.endB == that.getEndB())
           && (this.implicitRename == that.isImplicitRename());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= oldFilePath.hashCode();
    h$ *= 1000003;
    h$ ^= newFilePath.hashCode();
    h$ *= 1000003;
    h$ ^= beginA;
    h$ *= 1000003;
    h$ ^= endA;
    h$ *= 1000003;
    h$ ^= beginB;
    h$ *= 1000003;
    h$ ^= endB;
    h$ *= 1000003;
    h$ ^= implicitRename ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy