Ejemplo n.º 1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Board other = (Board) obj;
   if (boardId != other.boardId) return false;
   if (boardType == null) {
     if (other.boardType != null) return false;
   } else if (!boardType.equals(other.boardType)) return false;
   if (ip == null) {
     if (other.ip != null) return false;
   } else if (!ip.equals(other.ip)) return false;
   if (isAnnexB == null) {
     if (other.isAnnexB != null) return false;
   } else if (!isAnnexB.equals(other.isAnnexB)) return false;
   if (isLeasing == null) {
     if (other.isLeasing != null) return false;
   } else if (!isLeasing.equals(other.isLeasing)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (slot == null) {
     if (other.slot != null) return false;
   } else if (!slot.equals(other.slot)) return false;
   return true;
 }
Ejemplo n.º 2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + boardId;
   result = prime * result + ((boardType == null) ? 0 : boardType.hashCode());
   result = prime * result + ((ip == null) ? 0 : ip.hashCode());
   result = prime * result + ((isAnnexB == null) ? 0 : isAnnexB.hashCode());
   result = prime * result + ((isLeasing == null) ? 0 : isLeasing.hashCode());
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((slot == null) ? 0 : slot.hashCode());
   return result;
 }