本文整理了Java中org.modeshape.common.util.HashCode._compute()
方法的一些代码示例,展示了HashCode._compute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HashCode._compute()
方法的具体详情如下:
包路径:org.modeshape.common.util.HashCode
类名称:HashCode
方法名:_compute
[英]Compute a combined hash code from the supplied objects using the supplied seed.
[中]使用提供的种子从提供的对象计算组合哈希代码。
代码示例来源:origin: org.modeshape/modeshape-common
/**
* Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied.
*
* @param objects the objects that should be used to compute the hash code
* @return the hash code
*/
public static int compute( Object... objects ) {
return _compute(0, objects);
}
代码示例来源:origin: org.fcrepo/modeshape-common
/**
* Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied.
*
* @param objects the objects that should be used to compute the hash code
* @return the hash code
*/
public static int compute( Object... objects ) {
return _compute(0, objects);
}
代码示例来源:origin: ModeShape/modeshape
/**
* Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied.
*
* @param objects the objects that should be used to compute the hash code
* @return the hash code
*/
public static int compute( Object... objects ) {
return _compute(0, objects);
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldComputeHashCodeForMultiplePrimitives() {
assertThat(HashCode._compute(1, 2, 3), is(not(0)));
assertThat(HashCode.compute((long)8, (long)22, 33), is(not(0)));
assertThat(HashCode._compute((short) 3, (long) 22, true), is(not(0)));
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldComputeHashCodeForOnePrimitive() {
assertThat(HashCode._compute(1), is(not(0)));
assertThat(HashCode.compute((long)8), is(not(0)));
assertThat(HashCode._compute((short) 3), is(not(0)));
assertThat(HashCode.compute(1.0f), is(not(0)));
assertThat(HashCode.compute(1.0d), is(not(0)));
assertThat(HashCode.compute(true), is(not(0)));
}
内容来源于网络,如有侵权,请联系作者删除!