本文整理了Java中java.lang.Byte.hashCode()
方法的一些代码示例,展示了Byte.hashCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Byte.hashCode()
方法的具体详情如下:
包路径:java.lang.Byte
类名称:Byte
方法名:hashCode
[英]Returns a hash code for this Byte; equal to the result of invoking intValue().
[中]返回此字节的哈希代码;等于调用intValue()的结果。
代码示例来源:origin: vavr-io/vavr
/**
* Returns the hashcode of the given value.
*
* @param value the value to hash
* @return the hashcode
* @see Byte#hashCode()
*/
static int hash(byte value) {
return Byte.hashCode(value);
}
代码示例来源:origin: google/guava
@Override
public int hashCode() {
return i.hashCode();
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
@Override
public int hashCode() {
int result = 0;
for (int i = 0; i < bytes.length; i++) {
result ^= Byte.valueOf(bytes[i]).hashCode();
}
result ^= Double.valueOf(weight).hashCode();
return result;
}
代码示例来源:origin: stanfordnlp/CoreNLP
/**
* {@inheritDoc}
* <p>
* Implementation note: this hash code should be consistent with {@link Boolean#hashCode}.
* </p>
*/
public int hashCode() {
if (this.isTrue()) {
return Boolean.hashCode(true);
} else if (this.isFalse()) {
return Boolean.hashCode(false);
} else {
return Byte.hashCode(value);
}
}
代码示例来源:origin: apache/mahout
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Byte.valueOf(x).hashCode();
return result;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserPermissionId() == null) ? 0 : getUserPermissionId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserOauthId() == null) ? 0 : getUserOauthId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getOauthId() == null) ? 0 : getOauthId().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + (Arrays.hashCode(getOpenId()));
return result;
}
}
代码示例来源:origin: google/guava
public void testHashCode() {
for (byte value : VALUES) {
assertEquals(((Byte) value).hashCode(), Bytes.hashCode(value));
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPayInOrderId() == null) ? 0 : getPayInOrderId().hashCode());
result = prime * result + ((getPayVendorId() == null) ? 0 : getPayVendorId().hashCode());
result = prime * result + ((getPayMchId() == null) ? 0 : getPayMchId().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPayOutOrderId() == null) ? 0 : getPayOutOrderId().hashCode());
result = prime * result + ((getPayMchId() == null) ? 0 : getPayMchId().hashCode());
result = prime * result + ((getPayVendorId() == null) ? 0 : getPayVendorId().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAlias() == null) ? 0 : getAlias().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
result = prime * result + ((getRealname() == null) ? 0 : getRealname().hashCode());
result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
result = prime * result + ((getLocked() == null) ? 0 : getLocked().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAlias() == null) ? 0 : getAlias().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getPermissionValue() == null) ? 0 : getPermissionValue().hashCode());
result = prime * result + ((getUri() == null) ? 0 : getUri().hashCode());
result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getCreateIp() == null) ? 0 : getCreateIp().hashCode());
result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getCommentId() == null) ? 0 : getCommentId().hashCode());
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
result = prime * result + ((getAgent() == null) ? 0 : getAgent().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getIcon() == null) ? 0 : getIcon().hashCode());
result = prime * result + ((getBanner() == null) ? 0 : getBanner().hashCode());
result = prime * result + ((getTheme() == null) ? 0 : getTheme().hashCode());
result = prime * result + ((getBasepath() == null) ? 0 : getBasepath().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
return result;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode());
result = prime * result + ((getTopicId() == null) ? 0 : getTopicId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
result = prime * result + ((getFromurl() == null) ? 0 : getFromurl().hashCode());
result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
result = prime * result + ((getKeywords() == null) ? 0 : getKeywords().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAllowcomments() == null) ? 0 : getAllowcomments().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getReadnumber() == null) ? 0 : getReadnumber().hashCode());
result = prime * result + ((getTop() == null) ? 0 : getTop().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
return result;
}
}
代码示例来源:origin: linlinjava/litemall
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_region
*
* @mbg.generated
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
return result;
}
代码示例来源:origin: org.apache.commons/commons-lang3
@Test
public void testHashCode() {
final MutableByte mutNumA = new MutableByte((byte) 0);
final MutableByte mutNumB = new MutableByte((byte) 0);
final MutableByte mutNumC = new MutableByte((byte) 1);
assertTrue(mutNumA.hashCode() == mutNumA.hashCode());
assertTrue(mutNumA.hashCode() == mutNumB.hashCode());
assertFalse(mutNumA.hashCode() == mutNumC.hashCode());
assertTrue(mutNumA.hashCode() == Byte.valueOf((byte) 0).hashCode());
}
内容来源于网络,如有侵权,请联系作者删除!