org.jdom2.Namespace.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(79)

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

Namespace.hashCode介绍

[英]This returns the hash code for the Namespace that conforms to the 'equals()' contract.

If two namespaces have the same URI, they are equal and have the same hash code, even if they have different prefixes.
[中]这将返回符合“equals()”约定的Namespace的哈希代码。
如果两个名称空间具有相同的URI,则它们相等且具有相同的哈希代码,即使它们的前缀不同。

代码示例

代码示例来源:origin: org.jdom/jdom

@Override
public int hashCode() {
  int result;
  result = (name != null ? name.hashCode() : 0);
  result = 29 * result + (namespace != null ? namespace.hashCode() : 0);
  return result;
}

代码示例来源:origin: org.jdom/jdom

@Override
public int hashCode() {
  // Generated by IntelliJ
  int result;
  result = (name != null ? name.hashCode() : 0);
  result = 29 * result + (namespace != null ? namespace.hashCode() : 0);
  return result;
}

代码示例来源:origin: com.rometools/rome-modules

@Override
public int hashCode() {
  int hash = 7;
  hash = 61 * hash + (element != null ? element.hashCode() : 0);
  hash = 61 * hash + (label != null ? label.hashCode() : 0);
  hash = 61 * hash + (namespace != null ? namespace.hashCode() : 0);
  return hash;
}

代码示例来源:origin: rometools/rome

@Override
public int hashCode() {
  int hash = 7;
  hash = 61 * hash + (element != null ? element.hashCode() : 0);
  hash = 61 * hash + (label != null ? label.hashCode() : 0);
  hash = 61 * hash + (namespace != null ? namespace.hashCode() : 0);
  return hash;
}

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

public int hashCode() {
  int hash = 7;
  hash = 61 * hash + (this.element != null ? this.element.hashCode() : 0);
  hash = 61 * hash + (this.label != null ? this.label.hashCode() : 0);
  hash = 61 * hash + (this.namespace != null ? this.namespace.hashCode() : 0);
  return hash;
}

代码示例来源:origin: org.apache.marmotta/sesame-tools-rio-rss

public int hashCode() {
  int hash = 7;
  hash = 61 * hash + (this.element != null ? this.element.hashCode() : 0);
  hash = 61 * hash + (this.label != null ? this.label.hashCode() : 0);
  hash = 61 * hash + (this.namespace != null ? this.namespace.hashCode() : 0);
  return hash;
}

相关文章

微信公众号

最新文章

更多