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

edu.stanford.protege.webprotege.change.AutoValue_OntologyAxiomPair Maven / Gradle / Ivy

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

import javax.annotation.Nonnull;
import javax.annotation.processing.Generated;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.model.OWLOntologyID;

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

  private final OWLOntologyID ontology;

  private final OWLAxiom axiom;

  AutoValue_OntologyAxiomPair(
      OWLOntologyID ontology,
      OWLAxiom axiom) {
    if (ontology == null) {
      throw new NullPointerException("Null ontology");
    }
    this.ontology = ontology;
    if (axiom == null) {
      throw new NullPointerException("Null axiom");
    }
    this.axiom = axiom;
  }

  @Nonnull
  @Override
  public OWLOntologyID getOntology() {
    return ontology;
  }

  @Nonnull
  @Override
  public OWLAxiom getAxiom() {
    return axiom;
  }

  @Override
  public String toString() {
    return "OntologyAxiomPair{"
        + "ontology=" + ontology + ", "
        + "axiom=" + axiom
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof OntologyAxiomPair) {
      OntologyAxiomPair that = (OntologyAxiomPair) o;
      return this.ontology.equals(that.getOntology())
          && this.axiom.equals(that.getAxiom());
    }
    return false;
  }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy