本文整理了Java中com.google.common.collect.Multiset.hashCode()
方法的一些代码示例,展示了Multiset.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Multiset.hashCode()
方法的具体详情如下:
包路径:com.google.common.collect.Multiset
类名称:Multiset
方法名:hashCode
[英]Returns the hash code for this multiset. This is defined as the sum of
((element == null) ? 0 : element.hashCode()) ^ count(element)
over all distinct elements in the multiset. It follows that a multiset and its entry set always have the same hash code.
[中]返回此多集的哈希代码。这被定义为
((element == null) ? 0 : element.hashCode()) ^ count(element)
在多重集合中的所有不同元素上。因此,multiset及其条目集始终具有相同的哈希代码。
代码示例来源:origin: google/guava
@Override
public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: google/guava
@Override
public int hashCode() {
return delegate().hashCode();
}
代码示例来源:origin: google/j2objc
@Override
public int hashCode() {
return delegate().hashCode();
}
代码示例来源:origin: google/j2objc
@Override
public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public int hashCode() {
return delegate().hashCode();
}
代码示例来源:origin: wildfly/wildfly
@Override
public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: google/guava
@CollectionSize.Require(ONE)
public void testHashCode_size1() {
assertEquals("multiset has incorrect hash code", 1 ^ e0().hashCode(), getMultiset().hashCode());
}
}
代码示例来源:origin: google/guava
@CollectionSize.Require(ZERO)
public void testHashCode_size0() {
assertEquals("multiset has incorrect hash code", 0, getMultiset().hashCode());
}
代码示例来源:origin: google/guava
public void testHashCodeMatchesEntrySet() {
assertEquals(getMultiset().entrySet().hashCode(), getMultiset().hashCode());
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
@Override public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public int hashCode() {
return delegate().hashCode();
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
@Override public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override public int hashCode() {
synchronized (mutex) {
return delegate().hashCode();
}
}
代码示例来源:origin: com.google.guava/guava-testlib-jdk5
@CollectionSize.Require(ONE)
public void testHashCode_size1() {
assertEquals("multiset has incorrect hash code",
1 ^ samples.e0.hashCode(), getMultiset().hashCode());
}
}
代码示例来源:origin: com.google.guava/guava-testlib
@CollectionSize.Require(ZERO)
public void testHashCode_size0() {
assertEquals("multiset has incorrect hash code", 0, getMultiset().hashCode());
}
代码示例来源:origin: com.google.guava/guava-testlib
@CollectionSize.Require(ONE)
public void testHashCode_size1() {
assertEquals("multiset has incorrect hash code", 1 ^ e0().hashCode(), getMultiset().hashCode());
}
}
代码示例来源:origin: com.google.guava/guava-testlib-jdk5
@CollectionSize.Require(ZERO)
public void testHashCode_size0() {
assertEquals("multiset has incorrect hash code",
0, getMultiset().hashCode());
}
内容来源于网络,如有侵权,请联系作者删除!