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

com.google.gerrit.server.query.AutoValue_QueryResult Maven / Gradle / Ivy

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


package com.google.gerrit.server.query;

import com.google.gerrit.common.Nullable;
import java.util.List;
import javax.annotation.Generated;

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

  private final String query;

  private final Predicate predicate;

  private final List entities;

  private final boolean more;

  AutoValue_QueryResult(
      @Nullable String query,
      Predicate predicate,
      List entities,
      boolean more) {
    this.query = query;
    if (predicate == null) {
      throw new NullPointerException("Null predicate");
    }
    this.predicate = predicate;
    if (entities == null) {
      throw new NullPointerException("Null entities");
    }
    this.entities = entities;
    this.more = more;
  }

  @Nullable
  @Override
  public String query() {
    return query;
  }

  @Override
  public Predicate predicate() {
    return predicate;
  }

  @Override
  public List entities() {
    return entities;
  }

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

  @Override
  public String toString() {
    return "QueryResult{"
         + "query=" + query + ", "
         + "predicate=" + predicate + ", "
         + "entities=" + entities + ", "
         + "more=" + more
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof QueryResult) {
      QueryResult that = (QueryResult) o;
      return ((this.query == null) ? (that.query() == null) : this.query.equals(that.query()))
           && (this.predicate.equals(that.predicate()))
           && (this.entities.equals(that.entities()))
           && (this.more == that.more());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (query == null) ? 0 : query.hashCode();
    h$ *= 1000003;
    h$ ^= predicate.hashCode();
    h$ *= 1000003;
    h$ ^= entities.hashCode();
    h$ *= 1000003;
    h$ ^= more ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy