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

edu.stanford.protege.webprotege.viz.AutoValue_RelationshipEdge Maven / Gradle / Ivy

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

import edu.stanford.protege.webprotege.entity.OWLEntityData;
import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;

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

  private final OWLEntityData head;

  private final OWLEntityData tail;

  private final OWLEntityData relationship;

  AutoValue_RelationshipEdge(
      OWLEntityData head,
      OWLEntityData tail,
      OWLEntityData relationship) {
    if (head == null) {
      throw new NullPointerException("Null head");
    }
    this.head = head;
    if (tail == null) {
      throw new NullPointerException("Null tail");
    }
    this.tail = tail;
    if (relationship == null) {
      throw new NullPointerException("Null relationship");
    }
    this.relationship = relationship;
  }

  @Nonnull
  @Override
  public OWLEntityData getHead() {
    return head;
  }

  @Override
  public OWLEntityData getTail() {
    return tail;
  }

  @Nonnull
  @Override
  public OWLEntityData getRelationship() {
    return relationship;
  }

  @Override
  public String toString() {
    return "RelationshipEdge{"
        + "head=" + head + ", "
        + "tail=" + tail + ", "
        + "relationship=" + relationship
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RelationshipEdge) {
      RelationshipEdge that = (RelationshipEdge) o;
      return this.head.equals(that.getHead())
          && this.tail.equals(that.getTail())
          && this.relationship.equals(that.getRelationship());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= head.hashCode();
    h$ *= 1000003;
    h$ ^= tail.hashCode();
    h$ *= 1000003;
    h$ ^= relationship.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy