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

com.google.gerrit.index.AutoValue_RefState Maven / Gradle / Ivy

There is a newer version: 3.10.1
Show newest version
package com.google.gerrit.index;

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

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

  private final String ref;

  private final ObjectId id;

  AutoValue_RefState(
      String ref,
      ObjectId id) {
    if (ref == null) {
      throw new NullPointerException("Null ref");
    }
    this.ref = ref;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
  }

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

  @Override
  public ObjectId id() {
    return id;
  }

  @Override
  public String toString() {
    return "RefState{"
        + "ref=" + ref + ", "
        + "id=" + id
        + "}";
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy