コード例 #1
0
  /** Creates an {@link InferredOWLOntologyID} using three OWLAPI {@link IRI}s. */
  public InferredOWLOntologyID(
      final IRI baseOntologyIRI, final IRI baseOntologyVersionIRI, final IRI inferredOntologyIRI) {
    super(baseOntologyIRI, baseOntologyVersionIRI);

    this.inferredOntologyIRI = inferredOntologyIRI;

    // Override hashcode if inferredOntologyIRI is not null, otherwise leave the hashcode to
    // match upstream
    if (inferredOntologyIRI != null) {
      // super uses 37, so to be distinct we need to use a different prime number here, ie, 41
      this.hashCode += 41 * inferredOntologyIRI.hashCode();
    }
  }
コード例 #2
0
ファイル: RDFResource.java プロジェクト: spbail/owlapi
 @Override
 public int hashCode() {
   return resource.hashCode();
 }