Exemplo n.º 1
0
 /* (non-Javadoc)
  * @see java.lang.Object#hashCode()
  */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((inventory == null) ? 0 : inventory.hashCode());
   result = prime * result + ((problem == null) ? 0 : problem.hashCode());
   return result;
 }
Exemplo n.º 2
0
 /* (non-Javadoc)
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   InventoryProblem other = (InventoryProblem) obj;
   if (inventory == null) {
     if (other.inventory != null) {
       return false;
     }
   } else if (!inventory.equals(other.inventory)) {
     return false;
   }
   if (problem != other.problem) {
     return false;
   }
   return true;
 }