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

com.google.gerrit.server.git.AutoValue_SearchingChangeCacheImpl_CachedChange Maven / Gradle / Ivy

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

import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.Change;
import com.google.gerrit.server.ReviewerSet;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SearchingChangeCacheImpl_CachedChange extends SearchingChangeCacheImpl.CachedChange {

  private final Change change;

  private final ReviewerSet reviewers;

  AutoValue_SearchingChangeCacheImpl_CachedChange(
      Change change,
      @Nullable ReviewerSet reviewers) {
    if (change == null) {
      throw new NullPointerException("Null change");
    }
    this.change = change;
    this.reviewers = reviewers;
  }

  @Override
  Change change() {
    return change;
  }

  @Nullable
  @Override
  ReviewerSet reviewers() {
    return reviewers;
  }

  @Override
  public String toString() {
    return "CachedChange{"
        + "change=" + change + ", "
        + "reviewers=" + reviewers
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SearchingChangeCacheImpl.CachedChange) {
      SearchingChangeCacheImpl.CachedChange that = (SearchingChangeCacheImpl.CachedChange) o;
      return this.change.equals(that.change())
          && (this.reviewers == null ? that.reviewers() == null : this.reviewers.equals(that.reviewers()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= change.hashCode();
    h$ *= 1000003;
    h$ ^= (reviewers == null) ? 0 : reviewers.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy