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

com.google.gerrit.server.change.AutoValue_ChangeTriplet Maven / Gradle / Ivy

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


package com.google.gerrit.server.change;

import com.google.gerrit.reviewdb.client.Branch;
import com.google.gerrit.reviewdb.client.Change;
import javax.annotation.Generated;

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

  private final Branch.NameKey branch;

  private final Change.Key id;

  AutoValue_ChangeTriplet(
      Branch.NameKey branch,
      Change.Key id) {
    if (branch == null) {
      throw new NullPointerException("Null branch");
    }
    this.branch = branch;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
  }

  @Override
  public Branch.NameKey branch() {
    return branch;
  }

  @Override
  public Change.Key id() {
    return id;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ChangeTriplet) {
      ChangeTriplet that = (ChangeTriplet) o;
      return (this.branch.equals(that.branch()))
           && (this.id.equals(that.id()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy