Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * @see java.lang.Object#hashCode()
  */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((buyer == null) ? 0 : buyer.hashCode());
   result = prime * result + contextId;
   result = prime * result + ((item == null) ? 0 : item.hashCode());
   result = prime * result + ((steamId1 == null) ? 0 : steamId1.hashCode());
   result = prime * result + ((steamId2 == null) ? 0 : steamId2.hashCode());
   return result;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  *
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (!(obj instanceof Sale)) {
     return false;
   }
   Sale other = (Sale) obj;
   if (buyer == null) {
     if (other.buyer != null) {
       return false;
     }
   } else if (!buyer.equals(other.buyer)) {
     return false;
   }
   if (contextId != other.contextId) {
     return false;
   }
   if (item == null) {
     if (other.item != null) {
       return false;
     }
   } else if (!item.equals(other.item)) {
     return false;
   }
   if (steamId1 == null) {
     if (other.steamId1 != null) {
       return false;
     }
   } else if (!steamId1.equals(other.steamId1)) {
     return false;
   }
   if (steamId2 == null) {
     if (other.steamId2 != null) {
       return false;
     }
   } else if (!steamId2.equals(other.steamId2)) {
     return false;
   }
   return true;
 }