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

edu.stanford.protege.webprotege.search.AutoValue_EntitySearchResult Maven / Gradle / Ivy

The newest version!
package edu.stanford.protege.webprotege.search;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import edu.stanford.protege.webprotege.entity.EntityNode;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;

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

  private final EntityNode entity;

  private final ImmutableList matches;

  AutoValue_EntitySearchResult(
      EntityNode entity,
      ImmutableList matches) {
    if (entity == null) {
      throw new NullPointerException("Null entity");
    }
    this.entity = entity;
    if (matches == null) {
      throw new NullPointerException("Null matches");
    }
    this.matches = matches;
  }

  @JsonProperty("term")
  @Nonnull
  @Override
  public EntityNode getEntity() {
    return entity;
  }

  @JsonProperty("matches")
  @Nonnull
  @Override
  public ImmutableList getMatches() {
    return matches;
  }

  @Override
  public String toString() {
    return "EntitySearchResult{"
        + "entity=" + entity + ", "
        + "matches=" + matches
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EntitySearchResult) {
      EntitySearchResult that = (EntitySearchResult) o;
      return this.entity.equals(that.getEntity())
          && this.matches.equals(that.getMatches());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy