本文整理了Java中co.cask.cdap.api.common.Bytes.hashCode()
方法的一些代码示例,展示了Bytes.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.hashCode()
方法的具体详情如下:
包路径:co.cask.cdap.api.common.Bytes
类名称:Bytes
方法名:hashCode
[英]Compute hash for binary data.
[中]计算二进制数据的哈希。
代码示例来源:origin: cdapio/cdap
/**
* Compute hash for binary data.
* @param b bytes to hash
* @return Runs {@link #hashBytes(byte[], int)} on the
* passed in array.
*/
public static int hashCode(final byte [] b) {
return hashCode(b, b.length);
}
代码示例来源:origin: cdapio/cdap
/**
* Returns a hash of a byte array segment as an Integer that can be used as key in Maps.
* @param b bytes to hash
* @param length length to hash
* @return A hash of <code>b</code> as an Integer that can be used as key in
* Maps.
*/
public static Integer mapKey(final byte [] b, final int length) {
return hashCode(b, length);
}
代码示例来源:origin: co.cask.cdap/cdap-api-common
/**
* Returns a hash of a byte array segment as an Integer that can be used as key in Maps.
* @param b bytes to hash
* @param length length to hash
* @return A hash of <code>b</code> as an Integer that can be used as key in
* Maps.
*/
public static Integer mapKey(final byte [] b, final int length) {
return hashCode(b, length);
}
代码示例来源:origin: co.cask.cdap/cdap-api-common
/**
* Returns a hash of a byte array as an Integer that can be used as key in Maps.
* @param b bytes to hash
* @return A hash of <code>b</code> as an Integer that can be used as key in
* Maps.
*/
public static Integer mapKey(final byte [] b) {
return hashCode(b);
}
代码示例来源:origin: co.cask.cdap/cdap-data-fabric
@Override
public int hashCode() {
return Bytes.hashCode(key);
}
代码示例来源:origin: cdapio/cdap
/**
* Returns a hash of a byte array as an Integer that can be used as key in Maps.
* @param b bytes to hash
* @return A hash of <code>b</code> as an Integer that can be used as key in
* Maps.
*/
public static Integer mapKey(final byte [] b) {
return hashCode(b);
}
代码示例来源:origin: co.cask.cdap/cdap-api-common
/**
* Compute hash for binary data.
* @param b bytes to hash
* @return Runs {@link #hashBytes(byte[], int)} on the
* passed in array.
*/
public static int hashCode(final byte [] b) {
return hashCode(b, b.length);
}
代码示例来源:origin: cdapio/cdap
@Override
public int hashCode() {
return Bytes.hashCode(key);
}
代码示例来源:origin: cdapio/cdap
@Override
public int hashCode() {
if (fieldType.getType() == FieldType.Type.BYTES) {
return Objects.hash(fieldType, Bytes.hashCode((byte[]) value));
}
return Objects.hash(fieldType, value);
}
代码示例来源:origin: cdapio/cdap
@Override
public int hashCode() {
return Objects.hashCode(getIdentifier(), getKeyId(), Bytes.hashCode(getDigestBytes()));
}
内容来源于网络,如有侵权,请联系作者删除!