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

edu.stanford.protege.webprotege.entity.AutoValue_EntityNode Maven / Gradle / Ivy

There is a newer version: 2.0.2-WHO
Show newest version
package edu.stanford.protege.webprotege.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import edu.stanford.protege.webprotege.common.DictionaryLanguage;
import edu.stanford.protege.webprotege.tag.Tag;
import edu.stanford.protege.webprotege.watches.Watch;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;
import org.semanticweb.owlapi.model.OWLEntity;

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

  private final OWLEntity entity;

  private final String browserText;

  private final ImmutableSet tags;

  private final boolean deprecated;

  private final ImmutableSet watches;

  private final int openCommentCount;

  private final ImmutableMap shortForms;

  private final ImmutableSet statuses;

  AutoValue_EntityNode(
      OWLEntity entity,
      String browserText,
      ImmutableSet tags,
      boolean deprecated,
      ImmutableSet watches,
      int openCommentCount,
      ImmutableMap shortForms,
      ImmutableSet statuses) {
    if (entity == null) {
      throw new NullPointerException("Null entity");
    }
    this.entity = entity;
    if (browserText == null) {
      throw new NullPointerException("Null browserText");
    }
    this.browserText = browserText;
    if (tags == null) {
      throw new NullPointerException("Null tags");
    }
    this.tags = tags;
    this.deprecated = deprecated;
    if (watches == null) {
      throw new NullPointerException("Null watches");
    }
    this.watches = watches;
    this.openCommentCount = openCommentCount;
    if (shortForms == null) {
      throw new NullPointerException("Null shortForms");
    }
    this.shortForms = shortForms;
    if (statuses == null) {
      throw new NullPointerException("Null statuses");
    }
    this.statuses = statuses;
  }

  @Nonnull
  @Override
  public OWLEntity getEntity() {
    return entity;
  }

  @Nonnull
  @Override
  public String getBrowserText() {
    return browserText;
  }

  @Override
  public ImmutableSet getTags() {
    return tags;
  }

  @Override
  public boolean isDeprecated() {
    return deprecated;
  }

  @Override
  public ImmutableSet getWatches() {
    return watches;
  }

  @Override
  public int getOpenCommentCount() {
    return openCommentCount;
  }

  @JsonIgnore
  @Nonnull
  @Override
  public ImmutableMap getShortForms() {
    return shortForms;
  }

  @JsonProperty("statuses")
  @Override
  public ImmutableSet getStatuses() {
    return statuses;
  }

  @Override
  public String toString() {
    return "EntityNode{"
        + "entity=" + entity + ", "
        + "browserText=" + browserText + ", "
        + "tags=" + tags + ", "
        + "deprecated=" + deprecated + ", "
        + "watches=" + watches + ", "
        + "openCommentCount=" + openCommentCount + ", "
        + "shortForms=" + shortForms + ", "
        + "statuses=" + statuses
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EntityNode) {
      EntityNode that = (EntityNode) o;
      return this.entity.equals(that.getEntity())
          && this.browserText.equals(that.getBrowserText())
          && this.tags.equals(that.getTags())
          && this.deprecated == that.isDeprecated()
          && this.watches.equals(that.getWatches())
          && this.openCommentCount == that.getOpenCommentCount()
          && this.shortForms.equals(that.getShortForms())
          && this.statuses.equals(that.getStatuses());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= entity.hashCode();
    h$ *= 1000003;
    h$ ^= browserText.hashCode();
    h$ *= 1000003;
    h$ ^= tags.hashCode();
    h$ *= 1000003;
    h$ ^= deprecated ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= watches.hashCode();
    h$ *= 1000003;
    h$ ^= openCommentCount;
    h$ *= 1000003;
    h$ ^= shortForms.hashCode();
    h$ *= 1000003;
    h$ ^= statuses.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy