org.openrdf.model.URI.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中org.openrdf.model.URI.hashCode()方法的一些代码示例,展示了URI.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.hashCode()方法的具体详情如下:
包路径:org.openrdf.model.URI
类名称:URI
方法名:hashCode

URI.hashCode介绍

[英]The hash code of an URI is defined as the hash code of its String-representation: toString().hashCode.
[中]URI的哈希代码定义为其字符串表示形式的哈希代码:toString()。哈希代码。

代码示例

代码示例来源:origin: openimaj/openimaj

@Override
  public int hashCode()
  {
    return this.uri.hashCode();
  }
}

代码示例来源:origin: org.apache.rya/rya.sail

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((impl == null) ? 0 : impl.hashCode());
  return result;
}

代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.model.sesame

@Override
public int hashCode() {
  return subject.hashCode();
}
@Override

代码示例来源:origin: com.github.sharispe/slib-graph-model-impl

@Override
public int hashCode() {
  int hash = 3;
  hash = 79 * hash + (this.source != null ? this.source.hashCode() : 0);
  hash = 79 * hash + (this.target != null ? this.target.hashCode() : 0);
  hash = 79 * hash + (this.predicate != null ? this.predicate.hashCode() : 0);
  return hash;
}

代码示例来源:origin: apache/stanbol

@Override
public int hashCode() {
  return subject.hashCode();
}
@Override

代码示例来源:origin: com.github.ansell.oas/oas-webservice-impl

@Override
public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ((this.ontologyUri == null) ? 0 : this.ontologyUri.hashCode());
  result = prime * result + ((this.ontologyVersionUri == null) ? 0 : this.ontologyVersionUri.hashCode());
  return result;
}

代码示例来源:origin: apache/stanbol

@Override
public int hashCode() {
  return uri.hashCode();
}
@Override

代码示例来源:origin: anno4j/anno4j

@Override
public int hashCode() {
  final int PRIME = 31;
  int result = 1;
  result = PRIME * result + ((pred == null) ? 0 : pred.hashCode());
  return result;
}

代码示例来源:origin: org.openimaj/core-rdf

@Override
  public int hashCode()
  {
    return this.uri.hashCode();
  }
}

代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.model.sesame

@Override
public int hashCode() {
  return uri.hashCode();
}
@Override

代码示例来源:origin: eu.fbk.rdfpro/rdfpro-rules

@Override
public int hashCode() {
  return this.id.hashCode();
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-rdbms

@Override
public int hashCode() {
  return uri.hashCode();
}

代码示例来源:origin: blazegraph/database

/**
 * Generated code.
 */
@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((graph == null) ? 0 : graph.hashCode());
  result = prime * result + ((uri == null) ? 0 : uri.hashCode());
  return result;
}

代码示例来源:origin: org.apache.rya/rya.api

/**
 * Generate a hash based on the string representations of both data and datatype.
 * @return A hash consistent with equals.
 */
@Override
public int hashCode() {
  int result = dataType != null ? dataType.hashCode() : 0;
  result = 31 * result + (data != null ? data.hashCode() : 0);
  return result;
}

代码示例来源:origin: blazegraph/database

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((c == null) ? 0 : c.hashCode());
  result = prime * result + ((o == null) ? 0 : o.hashCode());
  result = prime * result + ((p == null) ? 0 : p.hashCode());
  result = prime * result + ((s == null) ? 0 : s.hashCode());
  return result;
}

代码示例来源:origin: com.blazegraph/bigdata-core

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((c == null) ? 0 : c.hashCode());
  result = prime * result + ((o == null) ? 0 : o.hashCode());
  result = prime * result + ((p == null) ? 0 : p.hashCode());
  result = prime * result + ((s == null) ? 0 : s.hashCode());
  return result;
}

代码示例来源:origin: org.apache.rya/rya.indexing

@Override
public int hashCode() {
  int result = 17;
  result = 31*result + function.hashCode();
  result = 31*result + spConstraint.hashCode();
  result = 31*result + arguments.hashCode();
  
  return result;
}

代码示例来源:origin: org.apache.rya/rya.api

@Override
public int hashCode() {
  return 961 * ((this.getSubject() == null) ? (0) : (this.getSubject().hashCode())) +
      31 * ((this.getPredicate() == null) ? (0) : (this.getPredicate().hashCode())) +
      ((this.getObject() == null) ? (0) : (this.getObject().hashCode()));
}

代码示例来源:origin: blazegraph/database

public void testHashCode() {
  doLoadData();
  
  final ValueFactory vf = om.getValueFactory();
  final URI clssuri = vf.createURI("gpo:#1");
  IGPO clssgpo = om.getGPO(clssuri);
  
  assertTrue(clssgpo.hashCode() == clssgpo.getId().hashCode());
  assertTrue(clssgpo.hashCode() == clssuri.hashCode());
}

代码示例来源:origin: com.blazegraph/bigdata-core-test

public void testHashCode() {
  doLoadData();
  
  final ValueFactory vf = om.getValueFactory();
  final URI clssuri = vf.createURI("gpo:#1");
  IGPO clssgpo = om.getGPO(clssuri);
  
  assertTrue(clssgpo.hashCode() == clssgpo.getId().hashCode());
  assertTrue(clssgpo.hashCode() == clssuri.hashCode());
}

相关文章

微信公众号

最新文章

更多