/** * Returns the hashcode of the given value. * * @param value the value to hash * @return the hashcode * @see Short#hashCode() */ static int hash(short value) { return Short.hashCode(value); }
@Override public int hashCode() { return i.hashCode(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Short.valueOf(x).hashCode(); return result; }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Short.hashCode(getLanguageId()); hash = 31 * hash + Objects.hashCode(getName()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Short.hashCode(getCategoryId()); hash = 31 * hash + Objects.hashCode(getName()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getFilmId()); hash = 31 * hash + Short.hashCode(getCategoryId()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getInventoryId()); hash = 31 * hash + Integer.hashCode(getFilmId()); hash = 31 * hash + Short.hashCode(getStoreId()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
public void testHashCode() { for (short value : VALUES) { assertEquals(((Short) value).hashCode(), Shorts.hashCode(value)); } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Short.hashCode(getFilmId()); hash = 31 * hash + Objects.hashCode(getTitle()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getDescription())); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getRentalId()); hash = 31 * hash + Objects.hashCode(getRentalDate()); hash = 31 * hash + Integer.hashCode(getInventoryId()); hash = 31 * hash + Integer.hashCode(getCustomerId()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getReturnDate())); hash = 31 * hash + Short.hashCode(getStaffId()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getPaymentId()); hash = 31 * hash + Integer.hashCode(getCustomerId()); hash = 31 * hash + Short.hashCode(getStaffId()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getRentalId())); hash = 31 * hash + Objects.hashCode(getAmount()); hash = 31 * hash + Objects.hashCode(getPaymentDate()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getCustomerId()); hash = 31 * hash + Short.hashCode(getStoreId()); hash = 31 * hash + Objects.hashCode(getFirstName()); hash = 31 * hash + Objects.hashCode(getLastName()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getEmail())); hash = 31 * hash + Integer.hashCode(getAddressId()); hash = 31 * hash + Integer.hashCode(getActive()); hash = 31 * hash + Objects.hashCode(getCreateDate()); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Short.hashCode(getStaffId()); hash = 31 * hash + Objects.hashCode(getFirstName()); hash = 31 * hash + Objects.hashCode(getLastName()); hash = 31 * hash + Integer.hashCode(getAddressId()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getPicture())); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getEmail())); hash = 31 * hash + Short.hashCode(getStoreId()); hash = 31 * hash + Objects.hashCode(getActive()); hash = 31 * hash + Objects.hashCode(getUsername()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getPassword())); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
@Override public int hashCode() { int hash = 7; hash = 31 * hash + Integer.hashCode(getFilmId()); hash = 31 * hash + Objects.hashCode(getTitle()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getDescription())); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getReleaseYear())); hash = 31 * hash + Short.hashCode(getLanguageId()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getOriginalLanguageId())); hash = 31 * hash + Short.hashCode(getRentalDuration()); hash = 31 * hash + Objects.hashCode(getRentalRate()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getLength())); hash = 31 * hash + Objects.hashCode(getReplacementCost()); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getRating())); hash = 31 * hash + Objects.hashCode(OptionalUtil.unwrap(getSpecialFeatures())); hash = 31 * hash + Objects.hashCode(getLastUpdate()); return hash; } }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table litemall_order_goods * * @mbg.generated */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); result = prime * result + ((getGoodsSn() == null) ? 0 : getGoodsSn().hashCode()); result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode()); result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); result = prime * result + (Arrays.hashCode(getSpecifications())); result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode()); result = prime * result + ((getComment() == null) ? 0 : getComment().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); return result; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table litemall_cart * * @mbg.generated */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); result = prime * result + ((getGoodsSn() == null) ? 0 : getGoodsSn().hashCode()); result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode()); result = prime * result + (Arrays.hashCode(getSpecifications())); result = prime * result + ((getChecked() == null) ? 0 : getChecked().hashCode()); result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); return result; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table litemall_comment * * @mbg.generated */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getValueId() == null) ? 0 : getValueId().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getHasPicture() == null) ? 0 : getHasPicture().hashCode()); result = prime * result + (Arrays.hashCode(getPicUrls())); result = prime * result + ((getStar() == null) ? 0 : getStar().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); return result; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table litemall_coupon_user * * @mbg.generated */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getUsedTime() == null) ? 0 : getUsedTime().hashCode()); result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); return result; }
@Test public void testHashCode() { final MutableShort mutNumA = new MutableShort((short) 0); final MutableShort mutNumB = new MutableShort((short) 0); final MutableShort mutNumC = new MutableShort((short) 1); assertTrue(mutNumA.hashCode() == mutNumA.hashCode()); assertTrue(mutNumA.hashCode() == mutNumB.hashCode()); assertFalse(mutNumA.hashCode() == mutNumC.hashCode()); assertTrue(mutNumA.hashCode() == Short.valueOf((short) 0).hashCode()); }