/** * 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); }
@Override public int hashCode() { return i.hashCode(); }
@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; }
/** * {@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); } }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Byte.valueOf(x).hashCode(); return result; }
@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; } }
@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; } }
public void testHashCode() { for (byte value : VALUES) { assertEquals(((Byte) value).hashCode(), Bytes.hashCode(value)); } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
@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; } }
/** * 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; }
@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()); }