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

edu.stanford.protege.webprotege.perspective.AutoValue_BuiltInPerspective Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import edu.stanford.protege.webprotege.common.LanguageMap;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;

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

  private final PerspectiveId perspectiveId;

  private final LanguageMap label;

  private final boolean favorite;

  private final Node layout;

  AutoValue_BuiltInPerspective(
      PerspectiveId perspectiveId,
      LanguageMap label,
      boolean favorite,
      Node layout) {
    if (perspectiveId == null) {
      throw new NullPointerException("Null perspectiveId");
    }
    this.perspectiveId = perspectiveId;
    if (label == null) {
      throw new NullPointerException("Null label");
    }
    this.label = label;
    this.favorite = favorite;
    if (layout == null) {
      throw new NullPointerException("Null layout");
    }
    this.layout = layout;
  }

  @JsonProperty("perspectiveId")
  @Nonnull
  @Override
  public PerspectiveId getPerspectiveId() {
    return perspectiveId;
  }

  @JsonProperty("label")
  @Nonnull
  @Override
  public LanguageMap getLabel() {
    return label;
  }

  @JsonProperty("favorite")
  @Override
  public boolean isFavorite() {
    return favorite;
  }

  @JsonProperty("layout")
  @Nonnull
  @Override
  public Node getLayout() {
    return layout;
  }

  @Override
  public String toString() {
    return "BuiltInPerspective{"
        + "perspectiveId=" + perspectiveId + ", "
        + "label=" + label + ", "
        + "favorite=" + favorite + ", "
        + "layout=" + layout
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof BuiltInPerspective) {
      BuiltInPerspective that = (BuiltInPerspective) o;
      return this.perspectiveId.equals(that.getPerspectiveId())
          && this.label.equals(that.getLabel())
          && this.favorite == that.isFavorite()
          && this.layout.equals(that.getLayout());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= perspectiveId.hashCode();
    h$ *= 1000003;
    h$ ^= label.hashCode();
    h$ *= 1000003;
    h$ ^= favorite ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= layout.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy