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

com.google.gerrit.entities.AutoValue_PatchSet_Conflicts Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.entities;

import java.util.Optional;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PatchSet_Conflicts extends PatchSet.Conflicts {

  private final Optional ours;

  private final Optional theirs;

  private final boolean containsConflicts;

  AutoValue_PatchSet_Conflicts(
      Optional ours,
      Optional theirs,
      boolean containsConflicts) {
    if (ours == null) {
      throw new NullPointerException("Null ours");
    }
    this.ours = ours;
    if (theirs == null) {
      throw new NullPointerException("Null theirs");
    }
    this.theirs = theirs;
    this.containsConflicts = containsConflicts;
  }

  @Override
  public Optional ours() {
    return ours;
  }

  @Override
  public Optional theirs() {
    return theirs;
  }

  @Override
  public boolean containsConflicts() {
    return containsConflicts;
  }

  @Override
  public String toString() {
    return "Conflicts{"
        + "ours=" + ours + ", "
        + "theirs=" + theirs + ", "
        + "containsConflicts=" + containsConflicts
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PatchSet.Conflicts) {
      PatchSet.Conflicts that = (PatchSet.Conflicts) o;
      return this.ours.equals(that.ours())
          && this.theirs.equals(that.theirs())
          && this.containsConflicts == that.containsConflicts();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= ours.hashCode();
    h$ *= 1000003;
    h$ ^= theirs.hashCode();
    h$ *= 1000003;
    h$ ^= containsConflicts ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy